- 论坛徽章:
- 1
|
有没有试过..把全部叁数写在某个hash上...
拿掉後面的form_data, $ua会自动帮你填上...
然後像下面一样..传入reference...
另外我没记错的话..应该只有 name与value会传过去...如果你要传image里面的图片...
最後在接收端..另外处理....
$ua->post( $url, \%form )
$ua->post( $url, \@form )
$ua->post( $url, \%form, $field_name => $value, ... )
$ua->post( $url, $field_name => $value,... Content => \%form )
$ua->post( $url, $field_name => $value,... Content => \@form )
$ua->post( $url, $field_name => $value,... Content => $content )
This method will dispatch a POST request on the given $url, with %form or @form providing the key/value pairs for the fill-in form content. Additional headers and content options are the same as for the get() method.
This method will use the POST() function from HTTP::Request::Common to build the request. See HTTP::Request::Common for a details on how to pass form content and other advanced features.
[ 本帖最后由 apile 于 2008-7-7 13:19 编辑 ] |
|