Michael A
Michael A

Reputation: 5840

Setting response header parameters and query parameters

I am using javax.ws.rs.core.Response.

I want to send a response messeage with header parameters (String) and a query parameters (String). How can i define this in my response?

Now i am using:

return     Response.status(Response.Status.OK).entity(cur_request.getBody()).header("Location", "aaa").build();

Not sure what it means. In what format should the answer sent? for example if my header paramter is "Content-Type=application/xml", how can i pass this in my response.

Thanks.

Upvotes: 0

Views: 164

Answers (1)

horsley
horsley

Reputation: 480

You can use .header() to pass them or put then in the response entity

Upvotes: 1

Related Questions