关闭
Hit
enter
to search or
ESC
to close
May I Suggest ?
#leanote #leanote blog #code #hello world
柯仓无居所
Home
Archives
Tags
Search
curl 带 {} 参数请求
? curl GET {} ?
? curl GET ?
? URL 转换 ?
2911
0
0
swimming
? curl GET {} ?
? curl GET ?
? URL 转换 ?
> curl 请求如果 GET 方式参数带了{},处理起来比较麻烦,思路为将所有符号转换为URL 编码 --- 例如: - curl -X GET "http://poll.xxx.com/poll/query.do?customer=xxxxx&sign=xxxxx¶m={"com":"xxx","resultv4":"1","num":"xxxxx","show":"2","order":"desc"}" -H "Content-Type: application/json" > 转变后应该如下,注意需要带--location 参数: - curl --location --request GET 'https://poll.xxx.com/poll/query.do?customer=xxxxx&sign=xxxxx¶m=%7b%22com%22%3a%22xxx%22%2c%22resultv4%22%3a%221%22%2c%22num%22%3a%22xxxxx%22%2c%22show%22%3a%220%22%2c%22order%22%3a%22desc%22%7d' --header 'Content-Type: application/json' > 附上URL转换表 
觉得不错,点个赞?
提交评论
Sign in
to leave a comment.
No Leanote account ?
Sign up now
.
0
条评论
More...
文章目录
No Leanote account ? Sign up now.