Test-curl is a project mainly written in Perl, it's free.
Testing HTTP response using WWW::Curl::Easy
NAME Test::Curl - Testing HTTP response using WWW::Curl::Easy.
VERSION Version 0.05
SYNOPSIS use Test::Curl; use Test::More tests => 4; use WWW::Curl::Easy;
my $curl = new WWW::Curl::Easy;
$curl->setopt(CURLOPT_HEADER, 0);
$curl->setopt(CURLOPT_FOLLOWLOCATION, 0);
$curl->setopt(CURLOPT_VERBOSE, 0);
$curl->setopt(CURLOPT_UNRESTRICTED_AUTH, 1);
$curl->setopt(CURLOPT_NOBODY, 1);
$curl->setopt(CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1');
curl_ok($curl, 'http://localhost', 200);
curl_not_ok($curl, 'http://localhost', 404);
curl_200_ok($curl, 'http://github.com');
curl_200_not_ok($curl, 'http://www.github.com');
EXPORT curl_ok
curl_not_ok
curl_200_ok
curl_200_not_ok
SUBROUTINES/METHODS curl_ok ($curl, $url, $status) Checks if a host replies with $status correctly.
curl_not_ok ($curl, $url, $status) Does the exact opposite of curl_ok().
curl_200_ok ($curl, $url) Checks if a host replies with status 200 correctly.
curl_200_not_ok ($curl, $url) Does the exact opposite of curl_200_ok().
SUPPORT You can find documentation for this module with the perldoc command.
perldoc Test::Curl
If you have Git, this is the clone path:
[email protected]:z6x0a57/test-curl.git
You can also look for information at:
· GitHub Website:
http://github.com/z6x0a57/test-curl/tree/master
<http://github.com/z6x0a57/test-curl/tree/master>
AUTHOR z6x0a57, [email protected]
LICENSE AND COPYRIGHT Copyright (C) 2010 by z6x0a57
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.