こんにちは、私はURLにアクセスする次のコードを持っています:
NSString * stringURL = [NSString stringWithFormat:@"%@/%@/someAPI", kSERVICE_URL, kSERVICE_VERSION];
NSURLRequest * request = [NSURLRequest requestWithURL:[NSURL URLWithString:stringURL]];
AFJSONRequestOperation * operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
completionHandler(JSON, nil);
} failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) {
completionHandler(nil, error);
}];
HEADER
しかし、のように、のパラメータとしてユーザートークンを渡したいと思いますX-USER-TOKEN
。
見つけられAFNetworking documentation
ないのですが、操作の種類を変更する必要がありますか?