Question

Redirect to a website as a response of a rest service

When a service is hit i need to capture the hit and redirect the user to a website. How do i redirect it as a response for the hit on the service?

Correct Answer
June 13, 2019 - 10:19am

We found a simpler way to do it by adding the following paramters in the Rest API

Method: Get

Response :

Content type: "Application/XML"

Status Code: "302"

Header fields:

Name: location

map from: clipboard

Map from key : the url from the Request param.

 

Comments

Keep up to date on this post and subscribe to comments

June 13, 2019 - 6:55am

If the rest service is behind a web server or load balancer (normally this is the case in a real env), you can do that on the load balancer side. Check with your LB admin, e.g., this is an example for F5 a popular LB vendor: https://devcentral.f5.com/s/articles/irule-recipe-1-single-url-explicit-redirect-21910

June 13, 2019 - 10:19am

We found a simpler way to do it by adding the following paramters in the Rest API

Method: Get

Response :

Content type: "Application/XML"

Status Code: "302"

Header fields:

Name: location

map from: clipboard

Map from key : the url from the Request param.