Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Intercept all outgoing http calls

17cef8d1-a5ed-45d3-bb5b-c59abbdaf87dDec 12 2014 — edited Dec 30 2014

Similar to HttpFilter  (javax.Servlet.Filter ) which when added in web.xml can intercept any incoming request to JVM / outgoing (as response) independent of framework ( Spring/CXF/Jersy etc ) without any code changes (excluding the filter itself), I am trying to find an API or approach which could intercept any outgoing HTTP calls from JVM to add/modify headers independent of framework.

Quite often the word Outgoing HTTP call is misinterpreted in the forums so let me explain with example.

Let us assume there are two JVMs, jvm1 and jvm2. and there are HTTP calls being made from JVM1 to JVM2. I would like to intercept the HTTP connection being made from JVM1 to modify the headers information before the call happens. I do not want the code to be tied to a specific framework so that I can as bundle the interceptor as a jar and share it with application team. Changes in web.xml is fine.

Any suggestions? Please HELP!

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 27 2015
Added on Dec 12 2014
1 comment
1,696 views