Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 20th, 2012  |  syntax: None  |  size: 0.33 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. The resource methods can also accept JSON data for JAXB annotated classes:
  2.  
  3. @POST
  4. @Path("/create")
  5. @Consumes({"application/xml","application/json"})
  6. public Response createProduct(Product prod) { ... }
  7. The client should include the following header when submitting JSON data with a POST request:
  8.  
  9. Content-Type: application/json