Url auth 使用的是用户名和密码,但两者都有一个 @ 在 have trie 编码中仍然出现错误

Url auth using is username and password but both have a @ in have trie encoding still getting error

我需要授权我的 url ,发送用户名和密码。如果用户名是您的电子邮件并且您的密码也包含@,您会怎么做。还有其他方法吗

我试过了window.open("https://name:password@url");并尝试对所有内容进行编码,但出现字符串错误,任何提示

要解决这个问题你必须对用户名和密码进行编码(encodeURI)然后你可以添加它。我在url中也有https,这是错误的,只有一个https