mirror of
https://github.com/c-kr/check_json.git
synced 2024-11-23 19:03:49 +01:00
Added Accept application/json
Some APIs output only cleartext if a correct accept-header is missing.
This commit is contained in:
parent
75942dc27e
commit
23a7580f2e
@ -56,6 +56,7 @@ $np->getopts;
|
|||||||
my $ua = LWP::UserAgent->new;
|
my $ua = LWP::UserAgent->new;
|
||||||
|
|
||||||
$ua->agent('check_json/0.1');
|
$ua->agent('check_json/0.1');
|
||||||
|
$ua->default_header('Accept' => 'application/json');
|
||||||
$ua->protocols_allowed( [ 'http', 'https'] );
|
$ua->protocols_allowed( [ 'http', 'https'] );
|
||||||
$ua->parse_head(0);
|
$ua->parse_head(0);
|
||||||
$ua->timeout($np->opts->timeout);
|
$ua->timeout($np->opts->timeout);
|
||||||
|
Loading…
Reference in New Issue
Block a user