Over a million developers have joined DZone.

Using HTTP PATCH with JAX-RS 2

· Integration Zone

Build APIs from SQL and NoSQL or Salesforce data sources in seconds. Read the Creating REST APIs white paper, brought to you in partnership with CA Technologies.

Thanks to the popularity of REST, most of us now know HTTP methods like GET, POST, PUT and DELETE better than we probably care to. Nonetheless, most of you probably don't know much about a more obscure but pretty handy HTTP method - PATCH. If this is the case, you should check out this well-written blog post explaining the basics of HTTP PATCH.

JAX-RS 2 and Jersey do not support PATCH out of the box as it is not that widely understood or used quite yet. However, you can fairly easily add PATCH support using JAX-RS 2 - Oracle's own Gerard Davison shows us how. Like a small handful of us here at Oracle Gerard is a JavaLobby/DZone Most Valuable Blogger (MVB). Besides demonstrating how you might implement PATCH, the code-driven post uses a number of cool JAX-RS features such as meta annotations, name bindings, interceptors and providers. Enjoy!

The Integration Zone is brought to you in partnership with CA Technologies.  Use CA Live API Creator to quickly create complete application backends, with secure APIs and robust application logic, in an easy to use interface.


Published at DZone with permission of Reza Rahman, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}