SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
2.
みやした りゅうたろう
Mobile App Engineer
Titanium もくもく会 #21 in ZEPPELIN
3.
Titanium 3.3 で強化された点は……
Titanium もくもく会 #21 in ZEPPELIN
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.
…… ってあるのにね