4. HTTPClient Improvements
!
As of this Release, the HTTP client on iOS
uses the iOS NSURLConnection class,
replacing the ASIHTTPRequest class. The
new implementation did not add, modify
or remove any APIs. No modifications to
existing application should be required.
Titanium 3.3.0.GA Release Notes より引用 / Titanium もくもく会 #21 in ZEPPELIN
5. * *
* + うそです
n ∧_∧ n
+ (?(* ??`)E)
Y Y *
Titanium もくもく会 #21 in ZEPPELIN
6. var http = Ti.Network.createHTTPClient({
onload: function () {
console.log(this.responseText);
}
});
http.open('GET', 'http://httpbin.org/get');
http.send(null);
Titanium もくもく会 #21 in ZEPPELIN
9. 単なる GET でも
HTTP ヘッダが変わってます
※ Content-Type はワナだと思います
Titanium もくもく会 #21 in ZEPPELIN
10. で Header からクリアできると思いきや、
Titanium もくもく会 #21 in ZEPPELIN
ちなみに
http.setRequestHeader('Content-Type', null);
http.setRequestHeader('Content-Type', '');
じゃないと “値が” 消えないから要注意です
※ ドキュメントには … Value to assign to the header. May be null to clear a default header value, such as X-Requested-With.
…… ってあるのにね