// 請求管理者
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
manager.responseSerializer = [AFHTTPResponseSerializer serializer];
// 拼接請求參數
NSMutableDictionary *params = [NSMutableDictionary dictionary];
params[@"client_id"] = @"2331570398";
params[@"client_secret"] = @"240608336b729e27685af0ec496c1a60";
params[@"grant_type"] = @"authorization_code";
params[@"redirect_uri"] = @"http://192.168.33.10/request_01.php";
params[@"code"] = @"2331570398";
[manager POST:@"http://192.168.33.10/request_01.php" parameters:params progress:^(NSProgress * _Nonnull uploadProgress) {
} success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
NSLog(@"請求成功:%@", responseObject);
NSDictionary *JSON = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableContainers error:nil];
NSLog(@"請求成功JSON:%@", JSON);
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
NSLog(@"請求失敗:%@", error.description);
}];