Using HTTP PATCH with JAX-RS 2
Join the DZone community and get the full member experience.
Join For FreeThanks 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!
Published at DZone with permission of Reza Rahman, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Trending
-
Never Use Credentials in a CI/CD Pipeline Again
-
4 Expert Tips for High Availability and Disaster Recovery of Your Cloud Deployment
-
Security Challenges for Microservice Applications in Multi-Cloud Environments
-
Transactional Outbox Patterns Step by Step With Spring and Kotlin
Comments