柏树带有持票人令牌访问页面
我正在尝试带有持票人令牌的页面,但似乎不起作用。当我使用Postman时,我可以访问该页面,但是如果我尝试使用代码,则不会。
我尝试
cy.visit({
url: '/',
headers: {
authorization: `Bearer ${token}`
}
})
了授权。我还尝试了cypress.env
并设置localstorage
,但似乎没有用。
I am trying to visit a page with a Bearer token, but it does not seem to work. When I use Postman, I am able to visit the page, but if I try to use code it does not.
I tried
cy.visit({
url: '/',
headers: {
authorization: `Bearer ${token}`
}
})
With the authorization. I also tried Cypress.env
and setting the localStorage
, but none seem to work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论