laziness, impatience, and hubris | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Monks, I have a script that makes an HTTP request directly by opening a socket and reading the response (I can't use LWP::UserAgent because the program is multi-tasking, so it can't block while waiting for the response). Okay, so now that I have the HTTP response in a buffer, I want to know what I've got there. Is there an easy way to turn it into an HTTP::Response object, so I can query some info out of it? I didn't see an appropriate method in the perldoc...
In fact, all I really need is the response code. So, if no one has a good idea of how to turn it into an HTTP::Response, perhaps you can have a look at this snippet and see if it looks okay as far as parsing the response for the code:
TIA, --3dan In reply to create a HTTP::Response object from a raw buffer? by edan
|
|