Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have tried 2 different ways but they both cause an error.<input name="/process.create" value="loc=AL&cat=4">
This causes a syntax error because of the "/" or "." in the field name.$request = POST 'http://www.server.com', Content => [ /process.create +=> 'loc=AL&cat=4' ]; my $response = $ua->request($request);
This doesn't cause any errors but when the server receives the data, it treats "/process.create" and "cat" as two different fields because of "&" that's in between. Is there anyway I can post this form? Thanks in advance.$contentdata = '/process.create=loc=AL&cat=4'; $encoded = uri_escape($contentdata); $request = new HTTP::Request('POST', 'www.server.com'); $request->content_type('application/x-www-form-urlencoded'); $request->content($encoded); my $response = $ua->request($request);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: LWP & POST
by MeowChow (Vicar) on Feb 15, 2001 at 12:31 UTC | |
by Anonymous Monk on Feb 15, 2001 at 12:39 UTC | |
by MeowChow (Vicar) on Feb 15, 2001 at 12:45 UTC | |
by Anonymous Monk on Feb 15, 2001 at 12:50 UTC | |
|
Re: LWP & POST
by extremely (Priest) on Feb 15, 2001 at 20:27 UTC |