ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-HTTP/HTTP.pm
(Generate patch)

Comparing AnyEvent-HTTP/HTTP.pm (file contents):
Revision 1.21 by root, Thu Jun 12 11:56:09 2008 UTC vs.
Revision 1.22 by root, Sat Jun 28 21:17:03 2008 UTC

48use AnyEvent::Socket (); 48use AnyEvent::Socket ();
49use AnyEvent::Handle (); 49use AnyEvent::Handle ();
50 50
51use base Exporter::; 51use base Exporter::;
52 52
53our $VERSION = '1.02'; 53our $VERSION = '1.03';
54 54
55our @EXPORT = qw(http_get http_post http_head http_request); 55our @EXPORT = qw(http_get http_post http_head http_request);
56 56
57our $USERAGENT = "Mozilla/5.0 (compatible; AnyEvent::HTTP/$VERSION; +http://software.schmorp.de/pkg/AnyEvent)"; 57our $USERAGENT = "Mozilla/5.0 (compatible; AnyEvent::HTTP/$VERSION; +http://software.schmorp.de/pkg/AnyEvent)";
58our $MAX_RECURSE = 10; 58our $MAX_RECURSE = 10;
466 unshift @_, "HEAD"; 466 unshift @_, "HEAD";
467 &http_request 467 &http_request
468} 468}
469 469
470sub http_post($$@) { 470sub http_post($$@) {
471 my $url = shift;
471 unshift @_, "POST", "body"; 472 unshift @_, "POST", $url, "body";
472 &http_request 473 &http_request
473} 474}
474 475
475=back 476=back
476 477

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines