0

How to forward an HTTP POST request with headers and body on a Jersey endpoint to an external endpoint without using redirects?

This does not help as it redirects the request and does not forward it. This does something similar. This does it for internal endpoints.

Jermon
  • 1
  • 1
  • Welcome to Stack Overflow. Please take the [tour](https://stackoverflow.com/tour). As it stands this question is rather off-topic as it is simply asking for an off-site resource and it is not terribly clear what you are trying to accomplish. – rmlan Apr 05 '18 at 14:11
  • Hey @rmlan, is the question better now? – Jermon Apr 05 '18 at 14:36
  • Why does it need to be Jersey? Jersey is a high-level library for creating RESTful endpoints easily. Generically proxying requests is a much lower-level problem. If you really want to use Java (which I wouldn't recommend), you should probably write a generic servlet that handles all requests. – rmlan Apr 05 '18 at 15:01
  • It's supposed to be served from a Tomcat container and the endpoint needs to go as a part of an application which already uses Jersey. And I need to serve it from the same origin and it's in an environment where I cannot put up a reverse proxy. Hence the issue. – Jermon Apr 05 '18 at 18:00
  • Use the Jersey Client – Paul Samsotha Apr 06 '18 at 05:28

0 Answers0