- POST https://login.live.com/oauth20_token.srf
- Content-type: application/x-www-form-urlencoded
- client_id=0005555555E1700&redirect_uri=http%3A%2F%2Fwww.contoso.com%2Fcallback.htm&client_secret=MdIepdjdfggd4sy8kzmHkU2VEKCLLo&code=2bd12503-7e88-bfe7-c5c7-82274a740ff&grant_type=authorization_code
Honestamente no sé si lo que hice está bien pero en algún momento me funcionó:
Using perl Syntax Highlighting
- $mech->add_header( Encoding => 'application/x-www-form-urlencoded' );
- $mech->post(
- 'https://login.live.com/oauth20_token.srf',
- #$form
- Content => 'client_id=00000000440D53FB&redirect_uri=http://yakane.krebox.com/index.pl?mode=login&client_secret=pFZtOG42WCNiDlg5OkFWQGs56h0ItKD&code='.$self->session->param('wl_token').'&grant_type=authorization_code'
- );
- my $content = $mech->content();
- my $data = $self->dec_json($content);
Coloreado en 0.003 segundos, usando GeSHi 1.0.8.4
pero ahora que lo ejecuto tengo:
- Error POSTing https://login.live.com/oauth20_token.srf: Bad Request at MyApp/MyBase.pm line 462.