0
OAuthConsumerフレームワーク/ヘルパークラスを使用してRESTful Webサービスと通信しています。私はOAuthのダンスを解決しました:-)しかし、私は配列のパラメータを必要とするいくつかの関数を持っています。OAuthConsumerを使用してRESTful WebサービスにNSArrayパラメータを送信する
私はそう
OARequestParameter *p0 = [[OARequestParameter alloc] initWithName:@"key"
value:@"value"];
NSArray *params = [NSArray arrayWithObjects:p0, nil];
OAMutableURLRequest *request = [[OAMutableURLRequest alloc] initWithURL:url
consumer: [MyOAUthAppDelegate sharedAppDelegate].consumer
token:[MyOAUthAppDelegate sharedAppDelegate].accessToken // we don't have a Token yet
realm:nil // our service provider doesn't specify a realm
signatureProvider:[[OAHMAC_SHA1SignatureProvider alloc] init]]; // use the default method, HMAC-SHA1
[request setHTTPMethod:@"POST"];
OADataFetcher *fetcher = [[OADataFetcher alloc] init]; //
[fetcher fetchDataWithRequest:request
delegate:self
didFinishSelector:@selector(requestTokenTicket:didFinishRESTWithData:)
didFailSelector:@selector(requestTokenTicket:didFailTESTWithError:)];
パラメータを設定しています。しかしWSは "受け入れられただけアレイ" を返しています。特にOAuthConsumerを使用して、私はこれはPHPやJavaScriptで非常に簡単になると思うが、私はiPhoneの要求から、配列パラメータを送信する方法がわからない
REST (POST parameters)
params[xxx]= int
params[yyy]= int
:
私の仕様は何かのように述べていオブジェクト:S