Changeset 17302
- Timestamp:
- 08/10/08 00:56:54 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/HTTP-Engine/trunk/t/010_core/request-as_http_request.t
r13758 r17302 2 2 use warnings; 3 3 use Test::More tests => 5; 4 use HTTP::Engine::Context; 4 use HTTP::Engine::Request; 5 use HTTP::Engine::RequestBuilder; 5 6 6 test_req( gen_ context()->req->as_http_request );7 test_req( gen_request()->as_http_request ); 7 8 8 sub gen_context { 9 my $c = HTTP::Engine::Context->new; 10 $c->req->method('POST'); 11 $c->req->uri('/foo'); 12 $c->req->content_type('application/octet-stream'); 13 $c->req->raw_body('foo=bar'); 14 $c; 9 sub gen_request { 10 my $req = HTTP::Engine::Request->new( 11 request_builder => HTTP::Engine::RequestBuilder->new, 12 ); 13 $req->method('POST'); 14 $req->uri('/foo'); 15 $req->content_type('application/octet-stream'); 16 $req->raw_body('foo=bar'); 17 $req; 15 18 } 16 19
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)