美文网首页
一次curl 多出boundary参数的报错

一次curl 多出boundary参数的报错

作者: 江江简书 | 来源:发表于2020-11-12 11:46 被阅读0次

最近在联调一些java写的接口时候,发现用postman怎么请求都会多出一个boundary=--------------------------509686223004304881648531的参数所以就一直没有成功

去除boundary参数

  • curl_setopt ( $curl, CURLOPT_POST, 1);
  • curl_setopt ( $curl, CURLOPT_HTTPHEADER,array('Content-Type: application/x-www-form-urlencoded'));
  • curl_setopt ( curl, CURLOPT_POSTFIELDS,http_build_query(params));

https://blog.csdn.net/veloi/article/details/80146660 --参考链接

相关文章

网友评论

      本文标题:一次curl 多出boundary参数的报错

      本文链接:https://www.haomeiwen.com/subject/qlaubktx.html