1、curl发送post 请求
function curl_post($url = '', $param = '') { if (empty($url) ||
empty($param)) { return false; } $postUrl = $url; $curlPost = $param; $ch =
curl_init(); curl_setopt($ch, CURLOPT_URL,$postUrl); curl_setopt($ch,
CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,
$curlPost); $data = curl_exec($ch); curl_close($ch); return $data; } function
testAction(){ $url = ''; $post_data['appKey'] = ''; $post_data['regionId'] =
''; $post_data['token'] = ''; $post_data['sign'] = ''; $o = ""; foreach (
$post_data as $k => $v ) { $o.= "$k=" . urlencode( $v ). "&" ; } $post_data =
substr($o,0,-1); $res = $this->curl_post($url, $post_data); print_r($res); }
2、postman模拟post请求



3、还可以直接在网上搜索在线测试工具,模拟post请求,填入对应的参数即可

 

友情链接
KaDraw流程图
API参考文档
OK工具箱
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:637538335
关注微信