in reply to REST::Client POST error

sannag:

Since 400 is a "Bad Request" according to Wikipedia, I'd expect that your URL isn't correct or a similar problem.

You might try visiting the site with Chrome and using the Developer tools panel to capture an actual interaction with the site and compare it with the values you're trying to use in your code.

Update: I just notice that your code is saying that you'll be posting form-encoded data, then you encode a JSON document, and don't include it in the POST. I think you're skipping a step or two...

...roboticus

When your only tool is a hammer, all problems look like your thumb.

Replies are listed 'Best First'.
Re^2: REST::Client POST error
by sannag (Sexton) on Aug 30, 2017 at 22:27 UTC

    I used Chrom ''Postman' rest client and was able to post and get a reply back. Sorry about the json encoding part, corrected the code the include the $bodyData in the post url

Re^2: REST::Client POST error
by sannag (Sexton) on Aug 31, 2017 at 13:59 UTC
    You are correct! I was just not smart to recognize it early on.....I was putting the content in json it should be in htttp format. I have a fix on it now and it is working :)