POST API 怎么可能在 Postman 中工作而不是在改造中工作?

编程入门 行业动态 更新时间:2024-10-24 10:25:46
本文介绍了POST API 怎么可能在 Postman 中工作而不是在改造中工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试使用一个登录 API,它也需要一些标题和正文.在最新版本的改造中,我尝试以注释或编程方式以两种方式发送标头,但每次都显示错误代码 417、异常失败且错误正文为空,但在邮递员中我得到了适当的响应.

I'm trying to hit one login API, which also need some headers and body. with the latest version of retrofit, I tried to send headers in both way either with annotation or programatically way, but everytime it says error code 417, exception failed and error body is null, but in postman I'm getting proper reponse.

推荐答案

你可以使用 HttpLoggingInterceptor 来比较请求并找出问题所在.

you can use HttpLoggingInterceptor to compare requests and find out what is wrong.

更多推荐

POST API 怎么可能在 Postman 中工作而不是在改造中工作?

本文发布于:2023-10-29 07:57:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1539146.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:是在   工作   能在   而不   POST

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!