Question

To my knowledge the correct way, in a restful sense, to handle creation of a new resource is to POST the request and then redirect the client to the result via header location field.

It seems ClientRequest does not support this. I cannot get the ClientRequest to automatically follow the see other (303) redirect after a post. When a PostMethod is created by the RestEasy client framework followRedirect is set to false ignoring the followRedirect set on the ClientRequest.

Is there another way?

Was it helpful?

Solution

The API has been specifically implemented to not automatically follow redirects.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top