From: Bill B. <bb...@re...> - 2014-05-12 14:34:03
|
You have to unpack the request and make another seaprate HTTP request, IMO. JAX-RS is not a proxy server! On 5/11/2014 7:00 AM, Rafael Chies wrote: > Hi Bernard, thanks for your answer. > > It would work if the redirection had to be done for every request. However, my decision for redirect or not is taken on the server, so I asw thinking in intercepting the request with the Resteasy API, verify in it if I have or not to redirect, and if so, I use the own Resteasy API to do this redirection. The problem is I have searched on Resteasy sources but didn't find yet how to do this redirection from the two objects that I have in in hands in my interception (HTTPRequest and ResourceMethod). > > Thanks, > > ----- Original Message ----- > From: "Bernard Łabno" <s4...@pj...> > To: "Rafael Chies" <rc...@re...> > Cc: res...@li... > Sent: Sunday, May 11, 2014 7:53:29 AM > Subject: Re: [Resteasy-developers] Intercept Request on Server and redirect to other host > > Sounds Like a job for mod-rewrite. > 11 maj 2014 12:51 "Rafael Chies" <rc...@re...> napisał(a): > >> Hi folks, >> >> I would like to know what is the best approach for intercept a Restful >> request on Server and so redo this same request but for other application. >> The URI and body must be the same, the only thing that must be changed are >> the host, port and context-root. >> >> First of all I thought doing that with HTTP redirection, but there are >> some cases that the redirection is for a POST method, and POST redirection >> results in a GET request, I don't want this, I want POST being redirected >> to the same POST request. >> >> Any thoughts would be helpful! >> >> Thanks in advance, >> >> -- >> Rafael Chies >> Senior Middleware Consultant >> Red Hat Brazil >> +55 11 35296000 >> +55 11 996949343 >> >> Better technology. Faster innovation. Powered by community collaboration. >> See how it works at redhat.com >> >> >> ------------------------------------------------------------------------------ >> Is your legacy SCM system holding you back? Join Perforce May 7 to find >> out: >> • 3 signs your SCM is hindering your productivity >> • Requirements for releasing software faster >> • Expert tips and advice for migrating your SCM now >> http://p.sf.net/sfu/perforce >> _______________________________________________ >> Resteasy-developers mailing list >> Res...@li... >> https://lists.sourceforge.net/lists/listinfo/resteasy-developers >> > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |