How to modify curl post command in postman

五迷三道 提交于 2021-01-29 06:08:04

问题


I developed POST api and tried to test them by POSTMAN

I tried to export to curl command.

I get following code.

curl --location --request POST 'http://localhost:3000/user' --form 'loginId=hikaru' --form 'password=test'

But,when I test such code,empty body was sent to server.

instead that, I modified to the following code.

This code can sent data to server.

curl --data "loginId=hikaru&password=test" http://localhost:3000/user

I'd like to know how to change curl structure via POSTMAN GUI.

generated code was slightly strange.

If someone has opinon,please let me know. thanks

来源:https://stackoverflow.com/questions/63975233/how-to-modify-curl-post-command-in-postman

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!