NAME

Test::Apache2::API::Request - Apache2::API::Request Testing Class

SYNOPSIS

my $hostport = Apache::TestRequest::hostport( $config ) || '';
my( $host, $port ) = split( ':', ( $hostport ) );
my $mp_host = 'www.example.org';
Apache::TestRequest::user_agent(reset => 1, keep_alive => 1 );
my $ua = Apache::TestRequest->new;
# To get the fingerprint for the certificate in ./t/server.crt, do:
# echo "sha1\$$(openssl x509 -noout -in ./t/server.crt -fingerprint -sha1|perl -pE 's/^.*Fingerprint=|(\w{2})(?:\:?|$)/$1/g')"
$ua->ssl_opts(
    # SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE, 
    # SSL_verify_mode => 0x00
    # verify_hostname => 0,
    SSL_fingerprint => 'sha1$DEE8650E44870896E821AAE4A5A24382174D100E',
    # SSL_version     => 'SSLv3',
    # SSL_verfifycn_name => 'localhost',
);
my $req = HTTP::Request->new( 'GET' => "${proto}://${hostport}/tests/request/some_method" );
my $resp = $ua->request( $req );
is( $resp->code, Apache2::Const::HTTP_OK, 'some test name' );

VERSION

v0.1.0

DESCRIPTION

This is a package for testing the Apache2::API module under Apache2/modperl2 and inherits from Test::Apache::Common

TESTS

aborted

accept

accept_charset

accept_encoding

accept_language

accept_type

accept_version

acceptable

acceptables

allowed

args

as_string

auth

auto_header

body

charset

client_api_version

connection

data

decode

encode

document_root

document_uri

env

finfo

gateway_interface

global_request

has_auth

header_only

headers

headers_as_hashref

headers_as_json

headers_in

is_secure

json

local_addr

method

mod_perl_version

no_cache

notes

param

params

path_info

payload

preferred_language

protocol

query

query_string

referer

remote_addr

request_time

server

socket

subprocess_env

the_request

time2str

type

uri

user_agent

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

Apache2::API, Apache::Test, Apache::TestUtil, Apache::TestRequest

COPYRIGHT & LICENSE

Copyright (c) 2019-2023 DEGUEST Pte. Ltd.

You can use, copy, modify and redistribute this package and associated files under the same terms as Perl itself.