PUT メソッドを使用して NSUrlConnection を介してデータを更新しようとしています。データを追加するために POST メソッドを使用していますが、正常に動作していますが、同時に PUT は動作していません。
NSURL *url=[NSURL URLWithString:[NSString stringWithFormat:@"%@update/%@?userId=%@",xapp.urlString,[dict valueForKey:@"id"],[profileDict valueForKey:@"id"]] ];
NSError *error;
NSData* jsonData = [NSJSONSerialization dataWithJSONObject:dict options:NSJSONWritingPrettyPrinted error:&error];
NSMutableURLRequest *request=[NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"PUT"];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
[request setHTTPBody:jsonData];
updateHiveConnection=[NSURLConnection connectionWithRequest:request delegate:self];
JSON データをこの API {"id":3,"active":false} に送信した後、エラーが発生しました
Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)" (No value.) UserInfo=0x1fb456f0 {NSDebugDescription=No value.}
どんな助けでも感謝します