When running the following curl command, I get back a 200
curl --location --request POST '<url hidden>' --header 'Content-Type: application/json' --data-raw '{"images": ["1/2/VB00J9D17kv0CeS4YzL1LKi+hCFqgI9vwufJUWkKBOA=/1.gif"] }'
However when written in apex, I get 400 bad request.
HttpRequest request = new HttpRequest();
request.setMethod('POST');
request.setHeader('Content-Type', 'application/json;charset=UTF-8');
String value = '{"images": ["1/2/VB00J9Dl7kv0CeS4YzL1LKi+hCFqgI9vwufJUWkKBOA=/1.gif"] }';
request.setEndpoint('<url hidden>');
request.setBody(value);
Http http = new Http();
HttpResponse response = http.send(request);
System.debug(response.getStatusCode() + ' ' + response.getStatus());'
I've also tried sending a body of '{}' on both the curl and the apex, and the curl correctly returns missing body while the apex one still states bad request.
I've tried breaking down to the most basic implementation even hardcoding the body string instead of JSON.stringify or JSONGenerator but no luck. I can't seem to figure out why one would work and the other fail, any help would be deeply deeply appreciated.
additional notes I've tried running this in execute anonymous and through being called from a LWC component (into apex method)