Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- problems assembling POST HTTP::Request
September 22, 2010, 4:55 pm
rate this thread
I'm trying to post a filename (that generally comes out of a html
<input type="file" box) to a perl script out of my perl script that
should pretend as if it was done by hand on the webpage...
The code POST request i came up with looks like this:
my $post = HTTP::Request->new(POST => $PostPage,
Content_Type => 'form-data',
Content => [ filename => 'file://mnt/ENGINEERING/Docs/Tropos/
but when i execute it i get:
Bad header argument at ./upgrdeFrmwr.pl line 50
Where line 50 is the first line of my POST request... I do'nt
understand, what kind of header argument may I require?
Thanks for hints and ideas!
Re: problems assembling POST HTTP::Request
HTTP::Request->new takes up to four arguments, the third of which must
be an HTTP::Headers object. You have passed six, none of which are.
I suspect you want the POST function (not method) out of
HTTP::Request::Common, or the ->post method on LWP::UserAgent.
- » FAQ 4.35 How do I find the soundex value of a string?
- — Next thread in » PERL Discussions
- » FAQ 4.3 Why isn't my octal data interpreted correctly?
- — Previous thread in » PERL Discussions