4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[Titanium] Basic認証

Posted at

HTTPClient

HTTPヘッダに入れる

	var xhr = Ti.Network.createHTTPClient({});
	xhr.open('POST', url);
	//xhr.setRequestHeader('Authorization', 'Basic ' + Titanium.Utils.base64encode(username + ':' + password));

またはurlに入れる

http://username:password@host.com/hogehoge

WebView

iOS

WebView#setBasicAuthentication
が効かない(試したバージョンは3.0.2.GA)
仕方ないのでurlに入れる方法を使う。

Android

urlに入れる方が効かない。
なのでsetBasicAuthenticationを使う。

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?