I am trying to call a REST Web Service using the Web Request action (POST) in Nintex Workflow (on-prem 2019). I have successfully called this service using both curl and Postman so I know I have the right parameters but when I try this in my Nintex workflow I get a "301 Moved Permanently" response status. I believe that this indicates that the server has moved to a new location (my response headers include one that says Server=nginx) but I can't make it work even with the new location information. So I checked the "Allow auto redirect" setting, assuming that this is what curl and Postman do to automatically follow the redirect but when doing that the response status is now 500, not 301, and the error message becomes "Result: HTTP::REST Error while determine Operation for request URI."
Does this mean that even though I specified POST as the request type that this information is not passed to the service on redirection? What do I need to do to get this to work in Nintex when it works, without redirection, in two other clients?
Solved! Go to Solution.
FWIW, I checked the curl documentation and there is an option, --post301, which the man file describes as follows:
(HTTP) Tells curl to respect RFC 7231/6.4.2 and not convert POST requests into GET requests when following a 301 redirection. The non-RFC behaviour is ubiquitous in web browsers, so curl does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when using -L, --location.
Is this what's missing in the Nintex workflow, requiring a POST to remain a POST?