Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: 500 Not a SCALAR reference

by 1nickt (Canon)
on Jan 08, 2019 at 01:44 UTC ( [id://1228174]=note: print w/replies, xml ) Need Help??


in reply to 500 Not a SCALAR reference

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1228174]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-23 07:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found