in reply to REST::Client POST error

This

Content-Type: application/x-www-form-urlencoded grant=client_credentials&partner={partner}&client={client}&secret={sec +ret}
Makes me think it is not expecting json encoded body but a normal http format.

via https://stackoverflow.com/questions/3635288/perl-programatically-set-post-param-using-restclient-module try

my @body_list = (grant => 'client_credentials', partner => ‘dfjkdjfdkdjkdkdjfdk’, client => 'dkfjdlfjdlfkjlj', client => 'dfkljflsfjlajflafjlsdkfjdskl=', # ne +ed encoding that is = will be %3D ); my $bodyData=substr($restClient->buildQuery(\@body_list),1);
im willing to bet the substr from 1 is to get rid of a leading ?

Replies are listed 'Best First'.
Re^2: REST::Client POST error
by sannag (Sexton) on Aug 31, 2017 at 13:53 UTC
    Dude, Thank you are absolutely correct....above correction fixed it. :). I was not paying attention to Json vs http format for content