Skip to content
Advertisement

Tag: rest

How to send enclose data in DELETE request in Jersey client?

I have the following server-side code in Jersey 2.x: On client side, I want to use Jersey 2.x client to send a delete request to the above web service. However, from the documentation of Jersey client API, I didn’t find how to enclose the following data in DELETE request: From the Jersey client API, the SyncInvoker class doesn’t support a

Rest Assured – can’t POST with Parameters and Body

I’m testing a REST api using Rest Assured. I’m running into an error when trying to POST with both a parameter in the url and body content. This works correctly when testing manually. Removing the parameter form the url is not an option Test Code: Which throws the following error when run Why does Rest Assured not allow both parameters

When to use @QueryParam vs @PathParam

I am not asking the question that is already asked here: What is the difference between @PathParam and @QueryParam This is a “best practices” or convention question. When would you use @PathParam vs @QueryParam. What I can think of that the decision might be using the two to differentiate the information pattern. Let me illustrate below my LTPO – less

REST API for Java?

I am preparing an application which is console based and the outcome of the application is a RDF/XML file which contains data of all my connections from LinkedIn. Now the problem is that my entire application is console based and I need to have a REST API so as to incorporate with my application. I am not aware of REST

How to get full REST request body using Jersey?

How can one get the full HTTP REST request body for a POST request using Jersey? In our case the data will be XML. Size would vary from 1K to 1MB. The docs seem to indicate you should use MessageBodyReader but I can’t see any examples. Answer Turns out you don’t have to do much at all. See below –

Encoding/decoding REST path parameters

I am trying to find the best way of getting round a design flaw in a web app I’m helping to support. One part of the service passes a parameter (“myparam”) to a .jsp page, which in turn calls a REST service including our myparam as a path parameter. The design flaw bit is that myparam should be passed as

Advertisement