Don't ask to ask, just ask | |
PerlMonks |
Re: 500 Not a SCALAR referenceby 1nickt (Canon) |
on Jan 08, 2019 at 01:44 UTC ( [id://1228174]=note: print w/replies, xml ) | Need Help?? |
Hi, you should not be mucking around with HTTP::Message directly. From the doc for HTTP::Request: $r->content( $bytes ) This is used to get/set the content and it is inherited from the HTTP::Message base class. See HTTP::Message for details and other methods that can be used to access the content. Note that the content should be a string of bytes. Strings in perl can contain characters outside the range of a byte. The Encode module can be used to turn such strings into a string of bytes.(You are passing an object, not a string of bytes.) See also https://metacpan.org/pod/HTTP::Request#Simple-POST. Hope this helps!
The way forward always starts with a minimal test.
In Section
Seekers of Perl Wisdom
|
|