in reply to Brackets in LWP Post
my $res = $ua->post( $url, $field_name => $value, Content => $content +);
Your code uses
$ua->post( $self->{'auth'}->api_url_base . 'shares', Content => encode_json($json), $header, );
So, dereference the header (I also tried to moving it before Content, but it doesn't seem to matter). This should remove the hash reference from the request.
$ua->post( $self->{'auth'}->api_url_base . 'shares', %$header, Content => encode_json($json) );
The ::std_case field just handles standard lowercasing of header keys, nothing to worry about.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Brackets in LWP Post
by Bod (Parson) on May 11, 2021 at 22:36 UTC |