2012-02-19 1 views

答えて

2

はい、あなたはチタンが(HttpClientを)自動的にあなたが体にパラメータを追加しようとした場合、POSTにDELETE変換し、意志することに注意してくださいHTTPClient

var url = "http://www.appcelerator.com"; 
var client = Ti.Network.createHTTPClient({ 
    // function called when the response data is available 
    onload : function(e) { 
     Ti.API.info("Received text: " + this.responseText); 
     alert('success'); 
    }, 
    // function called when an error occurs, including a timeout 
    onerror : function(e) { 
     Ti.API.debug(e.error); 
     alert('error'); 
    }, 
    timeout : 5000 /* in milliseconds */ 
}); 


// Prepare the connection. 
// This accepts PUT/DELETE/GET/POST 
client.open("PUT", url); 
// Send the request. 
client.send(); 
+0

はあなたが前にこのを試してみました:

この変換を実行するコードはASIHTTPRequest.m

if ([self postLength] > 0) { if ([requestMethod isEqualToString:@"GET"] || [requestMethod isEqualToString:@"DELETE"] || [requestMethod isEqualToString:@"HEAD"]) { [self setRequestMethod:@"POST"]; } [self addRequestHeader:@"Content-Length" value:[NSString stringWithFormat:@"%llu",[self postLength]]]; } [self setHaveBuiltPostBody:YES]; 

ソース内にありますか?どのSDKバージョンですか? –

+0

はい、私のコードで使用されています。 SDKのバージョンは1.8.2です – Kuroro

関連する問題