I have a dynamic web project where in I use apache cxf and HTTP. Now I've worked with POST and GET requests before.
On the java side, I'd use annotation @GET/@POST
etc and from the UI I can make requests to it.
I was just reading about the PUT
request and I am not able to place it just well in the above scenario. As much as I understand, PUT is used to add data or upload data. Now, what I don't understand is that
- How is PUT handled on java side. Can I please have an example here (link).
- Why use PUT? Even if I want to add some info, or upload, I can use POST for the same and then add it to my data source.