Forum Discussion
eric_the_tester
3 years agoOccasional Contributor
I found a solution and sharing here incase anyone has the same issue. I simply send a request to the actual service using groovy, and have the groovy logic for this executed before the Routing logic. You can use event handlers for this code snippet but I've placed it along the Routing script box for better visibility.
def get = new URL("Your 'Route to' host here" + mockRequest.path)
conn = get.openConnection();
conn.requestMethod = 'GET'
def headers = mockRequest.getRequestHeaders()
conn.setRequestProperty("session_token", headers.get('session_token')[0])
conn.getResponseCode();
Thanks all for the help.
Related Content
- 7 years ago
- 10 years ago
Recent Discussions
- 5 days ago
- 10 days ago