GET 请求在浏览器中有效,但在 POSTMAN 或 SOAPUI 中无效 [英] GET request works in browser but not in POSTMAN or SOAPUI

查看:59
本文介绍了GET 请求在浏览器中有效,但在 POSTMAN 或 SOAPUI 中无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下端点:

如果我使用 POSTMAN 或 SOAPUI 发送相同的 GET 请求,我会收到 401 Unauthorized.

我在这里缺少什么?提前致谢.

更新:

我接受了浏览器的标头请求并在 POSTMAN 中使用了相同,但我仍然收到 401 Unauthorized.端点的服务器是否有可能被配置为拒绝除浏览器之外的所有请求?

解决方案

我遇到了完全相同的问题,请求从浏览器工作但不使用邮递员.

由于 postman 跨设备同步,我相信它维护了很多缓存信息.我在应用程序中单击了我的个人资料并退出了所有设备.然后我启动了应用程序,没有登录,我点击了继续而不登录选项",这是一个靠近登录页面底部的链接.然后我就可以通过邮递员运行请求了.

然后我通过邮递员登录,一切都很好.

注意:我总是在请求的设置中关闭 SSL 证书验证.

I have the following endpoint: http://millennium.iwise.com.br:6017/api/millenium_eco/Tabelas_preco.lista

If I try to open via browser, it asks me credentials and then works fine - as seen on image below.

user: OData

password: 0d@t@123

If I send the same GET request using POSTMAN or SOAPUI I get 401 Unauthorized.

What I am missing here? Thank you in advance.

UPDATE:

I took the browser's header request and used the same in POSTMAN and I'm still receiving 401 Unauthorized. Is there a possibility of the endpoint's server is configured to reject all but browser's request?

解决方案

I got the exact same issue, requests working from the browser but not using postman.

Since postman syncs across devices, it maintains lot of cache info I believe. I clicked on my profile in the app and signed out from all the devices. I then started the app, did not sign in , I clicked on the "continue without signing in option" which is a link close to the bottom on the sign in page. Then I was able to run the requests via postman.

I then signed in and things were fine via postman.

Note: I always had the SSL certificate verification Off in setting for the request.

这篇关于GET 请求在浏览器中有效,但在 POSTMAN 或 SOAPUI 中无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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