1 //Request Manager2Afhttpsessionmanager *manager =[Afhttpsessionmanager manager];3Manager.responseserializer =[Afhttpresponseserializer serializer];4 5 6 //Stitching Request Parameters7Nsmutabledictionary *params=[Nsmutabledictionary dictionary];8 params[@"client_id"] =@"2331570398";9 params[@"Client_secret"] =@"240608336b729e27685af0ec496c1a60";Ten params[@"Grant_type"] =@"Authorization_code"; One params[@"Redirect_uri"] =@"/ http"; A params[@"Code"] =Code; - - the - -[Manager POST:@"Https://api.weibo.com/oauth2/access_token"Parametersparamsprogress:^ (nsprogress *_nonnull uploadprogress) { - +} success:^ (Nsurlsessiondatatask * _nonnull task,ID_nullable Responseobject) { -NSLog (@"Request succeeded:%@", responseobject); + ANsdictionary *json =[nsjsonserialization jsonobjectwithdata:responseobject options:nsjsonreadingmutablecontainers Error:nil]; at -NSLog (@"Request succeeded json:%@", JSON); - - -} failure:^ (Nsurlsessiondatatask * _nullable task, Nserror *_nonnull Error) { - inNSLog (@"request failed:%@", error.description); - to }]; +
AFNetworking3.0 POST Request