我无法使用 accesstoken 附加 curl 标头授权,如下所示:
curl -X GET -H "Authorization: AccessToken xxxxxxx"
我尝试过使用以下内容:
NSString *baseurl = @"http://localhost.com:9000";
AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:[NSURL URLWithString:baseurl]];
[httpClient setAuthorizationHeaderWithToken:@"xxxxxxxxx"];
NSMutableURLRequest *request = [httpClient requestWithMethod:@"GET"
path:@"ios/posts"
parameters:nil];
先感谢您