really low level http, https access
Ed Peschko <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.lwp |
|---|---|
| Message-ID | <20060806183852.GA13059@mdssdev05> |
hey all,
I was wondering how one could use libwww to send *really* low level get and post requests.
I have a spec that shows the exact text that needs to be sent to a service; Hence, instead
of perl doing any magic on the text when it sends it, I'd rather just pass a string to it
myself, as in:
my $req = Net::HTTPS->new( POST => "http://www.mysite.org");
$req->text("
POST /swapdriveservices/service.asmx/GetUserInfo HTTP/1.1
Host: www.swapdrive.com
Content-Type: application/x-www-form-urlencoded
Content-Length: $length
sAuthDomain=$mycontent
")
my $res = $ua->reqest($req);
print $res->as_string;
I don't know, it might be unnecessary, but I'd rather not have to munge the text
(since I have it verbatim in a source document). I'd rather just post the text
verbatim, and use perl variables to fill in the form variables.
Ed