in reply to HTTP::Request::Common : Specify POST fields separators ?
The purpose of WWW::Mechanize is to avoid having to bother with these details.#!/usr/bin/perl -- use strict; use warnings; use HTTP::Request::Common qw' POST '; my %params= ('page' => 28, 'index' => 36); print POST('http://example.org', \%params)->as_string,"\n\n"; print POST('http://example.org', { %params , qw' Content-Type form-dat +a ', } )->as_string; __END__ POST http://example.org Content-Length: 16 Content-Type: application/x-www-form-urlencoded index=36&page=28 POST http://example.org Content-Length: 39 Content-Type: application/x-www-form-urlencoded index=36&page=28&Content-Type=form-data
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: HTTP::Request::Common : Specify POST fields separators ?
by Anonymous Monk on Jan 05, 2010 at 08:18 UTC |