in reply to Bad Request 4000: HTTP::Request->new(POST => $server_endpoint)
Ahem, is this script supposed to send POST with JSON content? Then, first, { 'parm1': '$valueasscalar', 'parm2': 'TRUE',and: 'so on'} does not look like a valid JSON (no quotes around and), and, second, JSON may need a Content-type: application/json request header.
Did you try you query with curl first? Something like:
curl -v -XPOST -u 'myusername:mypassword' -H 'Content-type: applicatio +n/json' -d '{"parm1":"xxx","parm2":"yyy","and":"so on"}' https://api. +someserver.com/v1/
The Perl code looks okay to me, so the problem must be in the request itself.
|
|---|