Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

REST connector is not automatically redirecting

Updated on April 6, 2022

Troubleshoot problems with REST URL redirect responses by learning about the default behavior of REST connectors.

Condition

The REST connector fails with unexpected results when the endpoint returns a 3xx HTTP response code.

Cause

The endpoint returns a response code that indicates that the REST connector should redirect the request to a different endpoint URL.

Resolving REST URL redirect response problems

  • Familiarize yourself with the default behavior for REST connectors when they handle different URL redirect response codes for different HTTP methods.
    • REST connectors automatically redirect GET requests.
    • REST connectors automatically redirect POST or PATCH requests that result in a 303 response, but the redirect is sent as a GET request instead.
    • REST connectors do not automatically redirect POST, PATCH, PUT, or DELETE requests that result in a 301, 302, 307, or 308 response.
  • Use the following local change recommendation about making a second REST call when needed:
    Configure a second REST call that takes the value of the header that returns the redirect location. Use that header in the second call to split the REST calls into 2 parts. If the REST call returns a 3xx response code with a Location header value, pull the header value out and use it as the endpoint for the subsequent REST call.
  • To avoid building custom configuration, make sure to take the latest Pega Platform 8.x patch release. The latest patch release offers more configuration options on the Connect REST rule form.
    For more information, see Creating a Connect REST rule.
  • Previous topic REST proxy host configuration is incorrect
  • Next topic REST connector reads payload as binary data instead of text

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us