perlquestion
zer
Good evening,
<br>
Is there a way to have the level of http explicitly shown with the request? (ie. HTTP/1.1 HTTP/0.9)
<code>
my $ua = LWP::UserAgent->new;
my $h = HTTP::Headers->new;
$h->header('Content-Type' => 'text/x-json', Accept=>'text/x-json');
my $GetReq = HTTP::Request->new(
'PUT',
'http://localhost:8000/user/',
$h,
);
print $GetReq->as_string;
my $resp = $ua->request($GetReq);
</code>
Current output:
<code>
PUT http://localhost:8000/user/
Accept: text/json
User-Agent: libwww-perl/5.831
Content-Type: text/json
</code>
Desired output:
<code>
PUT http://localhost:8000/user/ HTTP/1.1
Accept: text/x-json
Content-Type: text/x-json
</code>
<br>Thank You