Web Request: Bad Request Error


#1

1) Give a description of the problem
Every time I attempt to make a web request to my external API, I receive a “Error executing external web request: groovyx.net.http.HttpResponseException: Bad Request” error

2) What is the expected behaviour?
A “GET” request to the given URL should return a JSON array of objects.

3) What is happening/not happening?
I am pretty positive that the authorization header is not the issue, as I worked through the issues I had with it until I no longer received a “forbidden” response. Now, however, every time I make the request I receive a “Bad Request” response. I know the variables in my URL are being formatted correctly, and just to be sure I ran the request with them hard coded in, same issue. The same URL has no issues in Postman and returns the JSON array correctly.

**4) Post a Green Snapshot of the piston!


(backup code removed)

5) Attach logs after turning logging level to Full
My logs contain links, and as a new user I cannot post them.

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

Two quick questions:

Can you confirm that {user} and {secret} are in your web request URL? (not seen above)

Do you have any “special” characters in either of those variables? (symbols etc)


#3

No special characters, my {user} and {secret} are in my authorization headers as "Basic {user}:{secret}. This seems to be working, as any other format returned “Forbidden” as the error


#4

It seems my header was formatted wrong, fixed the issue.