Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Passing both GET and POST params to HTTP Request

by Doctrin (Beadle)
on Feb 23, 2013 at 11:27 UTC ( #1020296=perlquestion: print w/replies, xml ) Need Help??
Doctrin has asked for the wisdom of the Perl Monks concerning the following question:

Hello dear Monks :) Say, I want to POST to an url like with a basic authorization. So, I do:
my $HttpReq = HTTP::Request->new( POST => " +?with=params&some=else"); $HttpReq->authorization_basic(&MY_LOGIN, &MY_PASSWORD);
It works; BUT, is there a way to provide GET params more, say, gently, like that, maybe:
my $HttpReq = HTTP::Request->new( POST => "" +, getparams => [with => 'params',some => 'else']); $HttpReq->authorization_basic(&MY_LOGIN, &MY_PASSWORD);
Thanks in advance

Replies are listed 'Best First'.
Re: Passing both GET and POST params to HTTP Request
by moritz (Cardinal) on Feb 23, 2013 at 12:19 UTC
      Thanks! URI would do the trick, I think :)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1020296]
Approved by moritz
[stevieb]: I'm learning that no matter how good a piece of software is at what it's supposed to do, it's a piece of shit without providing any API documentation. (Talking about C++ here currently). Seriously... write software for an embedded platform and make...
[stevieb]: guess based on the sparse examples, and the header files that are spread out illogically?
[stevieb]: document the public facing functions/methods people... ALL OF THEM.

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2017-05-28 23:45 GMT
Find Nodes?
    Voting Booth?