Paw在外部浏览器中打开链接 [英] Paw opens link in external browser

查看:182
本文介绍了Paw在外部浏览器中打开链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在开发端点时,我需要遵循一个相当复杂/繁琐的登录过程才能对我们的网守进行身份验证.

When developing endpoints I need to follow a rather complex/cumbersome login process to authenticate with our gatekeeper.

为此,我在Paw中打开开发人员登录页面.它会在爪子内部打开并正确呈现内容.如果我随后单击该按钮进行实际登录,则打开了一个外部浏览器,导致Paw失去了对适当cookie的跟踪.

For this I open the developer login page in Paw. It opens inside paw and renders the content properly. If I then click the button to actually login and an external browser is opened causing Paw to loose track of the proper cookies.

我想知道是否有可能将请求保留在Paws嵌入式浏览器中,以使cookie不会丢失,并且我可以继续测试端点.

I wonder if it would be possible to keep the request inside Paws embedded browser so the cookies are not lost and I can continue testing my endpoints.

推荐答案

要能够使用基于Cookie的身份验证进行登录,在Paw 2.1中,您可以使用此技巧:在启用了开发人员模式的情况下转到网络浏览器并登录网站.然后,在检查器/调试器中,转到Cookies(在Chrome/Safari中:检查器为Cmd + Option + I,然后依次选择资源"和"Cookies").复制会话/登录cookie.返回Paw并添加"Cookie:mySessionCookie = value"标题.它应该可以解决问题.

To be able to login using cookie-based auth, in Paw 2.1, you can use this hack: go to your web browser with developer mode enabled and login on the website. Then, in the Inspector / Debugger, go to Cookies (in Chrome/Safari: inspector is Cmd+Option+I, then tab "Resources" then "Cookies"). Copy the session/login cookie. Go back to Paw and add a "Cookie: mySessionCookie=value" header. It should do the trick.

注意:这是一种hacky方法.正如我之前的评论中所提到的,一种更好的方法即将来临.

这篇关于Paw在外部浏览器中打开链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆