如何处理 Postman 中密码中存在特殊字符的 URL?如何处理、特殊字符、存在、密码

2023-09-07 10:32:38 作者:贱人你廉价又百搭

我的 URL 格式如下.

I have the following format in URL.

http://username:password@test.nabin.com/some/url

这里的密码类似于 qDTA*$X)ME/74.当我直接在 URL 中使用这个密码时,邮递员没有响应.我应该如何继续测试这个网址?

Here password is something like qDTA*$X)ME/74. When I directly use this password in URL, then the postman does not respond. How should I proceed testing this url?

(在图像中,响应容器是纯白色的,没有任何错误.这表明 API 从未被命中)

(In the image the response container is plain white without any error. This indicates, the API was never hit)

推荐答案

您可以在应用程序中手动编码部分 URL.这些是版本 6 中的文档.

You can manually encode parts of the URL within the application. These are the docs from version 6.

https://learning.postman.com/docs/postman/sending-api-requests/requests/#sending-parameters

在 URL 部分下:

注意:您在 URL 栏或数据编辑器中输入的参数不会自动进行 URL 编码.右键选中一段文本,选择EncodeURIComponent"手动对参数值进行编码."

"Note: Parameters you enter in the URL bar or in the data editor will not automatically be URL-encoded. Right click a piece of selected text, and select "EncodeURIComponent" to manually encode the parameter value."