1

I am using Response.getResolvedRequestedURI in an interceptor in WSO2 microgateway to find the production url. However, I see this api returns always null.

What is way to get the production url to which wso2 has forwarded the call?

/**
 * Get the ultimate request URI that was made to receive the response when redirect is on
 * @return the requested URI
 */
public String getResolvedRequestedURI() 

1 Answers1

1

The endpoint, to which the request is forwarded by the Microgateway can be retrieved in the response path as follows.

public boolean interceptResponse(Caller caller, Response response) {
    Map<String, Object> attributes = Utils.getInvocationContextAttributes();
    Object destination = attributes.get("destination");
   .
   .
   .
}
menaka_
  • 1,092
  • 1
  • 13
  • 23