HTTP Method | In English |
---|---|
GET | Retrieve |
POST | Create |
PUT | Update |
DELETE | Delete |
Status Code | In English |
---|---|
100x | Informational |
200x | Received and understood |
300x | Redirect |
400x | PEBKAC or client error |
500x | BOOM! |
@Path("/recipes")
@GET
@PUT
@POST
@DELETE
@PathParam("id")
@QueryParam("tag")
@FormParam("xyz")
@Produces("application/json")
@Consumes("application/json")
N/A
N/A
@RequestMapping(path="/recipes")
@RequestMapping(method=RequestMethod.GET)
@RequestMapping(method=RequestMethod.PUT)
@RequestMapping(method=RequestMethod.POST)
@RequestMapping(method=RequestMethod.DELETE)
@PathVariable("id")
@RequestParam("tag")
@RequestParam(value="xyz")
@RequestMapping(produces="application/json")
@RequestMapping(consumes="application/json")
@RequestBody
@ResponseBody