1
0

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.

WinJS.xhrではURL埋め込みのBASIC認証がエラーになる

Posted at

(windows8 RTM)

winjs-xhr-basic-error.js
WinJS.xhr(
	type: 'get',
	url: "https://username:password@example.com"
)

とURLにBASIC認証の情報を埋め込んでリクエストを送ろうとすると
0x800c000e - JavaScript 実行時エラー: セキュリティの問題が発生しました。
と怒られます。

winjs-xhr-basic-error.js
WinJS.xhr(
	type: 'get',
	url: 'https://example.com',
	user: "username",
	password: "password"
)

素直にuserとpasswordオプションを使いましょう。

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?