initial import
[Net-HTTPS-Any.git] / t / post-netssleay.t
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5 use Test::More;
6
7 plan( tests=>4 );
8
9 use_ok 'Net::HTTPS::Any';
10
11 #200
12
13 my($content, $response, %headers) = Net::HTTPS::Any::https_post(
14   { 'host' => 'secure.sisd.com',
15     'port' => 443,
16     'path' => '/freeside/index.html',
17   },
18   'net_https_any_test' => 1,
19 );
20
21 like($response, qr/^HTTP\/[\d\.]+\s+200/i, 'Received 200 (OK) response');
22
23 ok( length($content), 'Received content' );
24
25 #404
26
27 my($content2, $response2, %headers2) = Net::HTTPS::Any::https_get(
28   { 'host' => 'secure.sisd.com',
29     'port' => 443,
30     'path' => '/freeside/notfound.html',
31   },
32   'net_https_any_test' => 1,
33 );
34
35 like($response2, qr/^HTTP\/[\d\.]+\s+404/i, 'Received 404 (OK) response');
36