my $ua = Mojo::UserAgent->new;
my $url = "https://postman-echo.com/post";
my $tx = $ua->post(
$url => {
'Authorization' => 'Basic xxxxxxxxxxxxxx',
'Content-Type' => 'application/x-www-form-urlencoded'
} => form => {
'grant_type' => 'authorization_code',
'code' => $code,
'xxx' => '777'
}
);
'{
"args": {},
"data": "",
"files": {},
"form": {},
"headers": {
"x-forwarded-proto": "https",
"x-forwarded-port": "443",
"host": "postman-echo.com",
"x-amzn-trace-id": "Root=1-653c253d-2bee01d92fa16ed279d4b219",
"content-type": "application/x-www-form-urlencoded",
"authorization": "Basic xxxxxxxxxxxxxx"
},
"json": null,
"url": "https://postman-echo.com/post"
}';
Anyone know the reason?
With regards,