in reply to Brackets in LWP Post

The documentation of the post method of LWP::UserAgent shows
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.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: Brackets in LWP Post
by Bod (Parson) on May 11, 2021 at 22:36 UTC

    Fantastic thanks :)
    That's moved me forwards significantly...