HTTP basic authentication URL with “@” in password

后端 未结 1 1665
时光说笑
时光说笑 2021-02-01 13:19

I\'m trying to set up some selenium tests to our staging server using Sauce Labs. It\'s behind a basic http auth, so theoretically I could set the selenium URL to http://u

1条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-01 14:14

    You just need to encode special characters like that before passing them as part of the URL, so @ would need to be passed as %40, eg:

    https://user:password%40www.example.com
    

    (I typically use this - http://meyerweb.com/eric/tools/dencoder/ - for my en/decoding needs.)

    0 讨论(0)
提交回复
热议问题