postcat icon indicating copy to clipboard operation
postcat copied to clipboard

API 文档/测试生成 curl\http 格式的调用代码

Open mcxinyu opened this issue 1 year ago • 3 comments

希望增加复制为 cURL、HTTP 的功能

e.g.

curl --location --request GET 'http://www.weather.com.cn/data/cityinfo/{{cityCode}}.html' \
--header 'Cookie: HttpOnly'
GET /data/cityinfo/{{cityCode}}.html HTTP/1.1
Host: www.weather.com.cn
Cookie: HttpOnly

mcxinyu avatar Nov 20 '22 11:11 mcxinyu

感谢建议~

scarqin avatar Nov 20 '22 16:11 scarqin

@mcxinyu 你的 cURL、HTTP 一般是从什么应用导出的,网关、浏览器? 方便描述下具体的场景?

scarqin avatar Nov 21 '22 02:11 scarqin

postman可以看到这种功能,在接口右边有个代码的标志</>点击即可看到。curl复制后可以直接在终端调试、HTTP可以直接在ide运行。 image

mcxinyu avatar Nov 21 '22 07:11 mcxinyu