• Good Evening

    I’ve been developing a plugin which uses wp_remote_request to POST to an external api. When the external api successfully creates a record it sends a response of 200 with a url in the header location. It seems that WordPress is the redirecting to this url which returns a 404 status.

    Stopping wp_remote_request from following redirects by using “redirection => 0” stops this from happening.

    Is there a know issue where the location url is followed even when a status other than 3xx is received?

    Thank You for your help. Best Regards

    Ben

  • The topic ‘wp_remote_request redirect on 201 status’ is closed to new replies.