- The resource methods can also accept JSON data for JAXB annotated classes:
- @POST
- @Path("/create")
- @Consumes({"application/xml","application/json"})
- public Response createProduct(Product prod) { ... }
- The client should include the following header when submitting JSON data with a POST request:
- Content-Type: application/json