如果使用HTTP身份驗證,則可以嘗試在URI方案和域名之間添加username:[email protected]
。
例如:
https://username:[email protected]/
從http://www.w3.org/Addressing/URL/url-spec.txt:
Those schemes which refer to internet protocols mostly have a
common syntax for the rest of the object name. This starts with a
double slash "//" to indicate its presence, and continues until the
following slash "/". Within that section are
An optional user name,
if required (as it is with a few FTP
servers). The password, is present, follows
the user name, separated from it by a colon;
the user name and optional password are
followed by a commercial at sign "@". The
user of user name and passwords which are
public is discouraged.
請注意,您需要% encode用戶名密碼&如果它們包含特殊字符。