0

以下の機能に問題があります:

NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:
                       sportid, @"sport",
                        country,  SC_PAIS,
                        team,     SC_TEAM,
                        token,    SC_TOKEN,nil];

    [[SCHTTPClientServer sharedClient] setParameterEncoding:AFJSONParameterEncoding];
       [[SCHTTPClientServer sharedClient] putPath:@"calendarelemfilters/teams" parameters:params success:^(AFHTTPRequestOperation *operation, id responseObject) {
            NSLog(@"RESPonsee %@",responseObject);

        } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
            NSLog(@"ERROR %@",[error localizedDescription]);

        }];

これは私のコードです。以下のエラーがあります - どうすれば修正できますか?

ありがとう

"""応答文字列: <>Apache Tomcat/7.0.26 - エラー レポート

HTTP ステータス 400 - 必須の文字列パラメータ「token」が存在しません

タイプステータス レポート

message必須の文字列パラメーター 'token' が存在しません

説明クライアントから送信された要求は構文的に正しくありません (必須の文字列パラメーター 'token' が存在しません)。

アパッチ トムキャット/7.0.26

2013-09-19 13:10:24.254 ISportsCal[834:907] エラー (200-299) でステータス コードが予期され、400 を取得しました"""

4

2 に答える 2

0

postPath で修正しました。また、以下のように「setparameter encoding」を設定しました。

[[SCHTTPClientServer sharedClient] setParameterEncoding:AFFormURLParameterEncoding];

ありがとう

于 2013-09-25T08:53:34.570 に答える