gjwilson21 has asked for the wisdom of the Perl Monks concerning the following question:
I am currently working on automating file submission to a portal. I face a problem regarding content types. My request is like
I expect a request something like$filename='testfile'; $req=POST 'https://www.abcd.com/fileUpload.aspx', Content_Type=>'form- +data', Content => [file1=>["$filename"],file4=>[""],file5=>[""]];
since the data i captured using a HTTP Sniffer showed the request was like this. But the request it is generating is like--xYzZY Content-Disposition: form-data; name="file1"; filename="testfile " Content-Type: application/octet-stream Test File Contents --xYzZY Content-Disposition: form-data; name="file4" filename="" --xYzZY Content-Disposition: form-data; name="file5" filename=""
Please help me figure out how to create a request like this. Thanks in advance--xYzZY Content-Disposition: form-data; name="file1"; filename="testfile " Content-Type: application/octet-stream Test File Contents --xYzZY Content-Disposition: form-data; name="file4" --xYzZY Content-Disposition: form-data; name="file5"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Query regarding HTTP:Request
by atemon (Chaplain) on Jul 26, 2007 at 08:22 UTC | |
|
Re: Query regarding HTTP:Request
by Anonymous Monk on Jul 26, 2007 at 07:09 UTC |