We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在发送数据的时候,如果一次发送比较多的数据,数据直接跟在url之后,发送的数据在body中,目前不支持post,文档中写的支持,是怎么回事?
请求路径:POST https://openapi.baidu.com/rest/2.0/smartapp/access/submitsitemap/api?access_token=ACCESS_TOKEN
The text was updated successfully, but these errors were encountered:
在发送数据的时候,如果一次发送比较多的数据,数据直接跟在url之后,发送的数据在body中,目前不支持post,文档中写的支持,是怎么回事? 请求路径:POST https://openapi.baidu.com/rest/2.0/smartapp/access/submitsitemap/api?access_token=ACCESS_TOKEN
支持post请求,文档上写的很清楚:https://smartprogram.baidu.com/docs/introduction/rank_api/
Sorry, something went wrong.
给你个demo <?php $urls = array( '/pages/index1?id=1', '/pages/index2', ); $data['url_list'] = implode(",", $urls); $api = 'https://openapi.baidu.com/rest/2.0/smartapp/access/submitsitemap/api?access_token=xxx'; $ch = curl_init(); $options = array( CURLOPT_URL => $api, CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_NOBODY => false, CURLOPT_POSTFIELDS => http_build_query($data), CURLOPT_HTTPHEADER => array('Content-Type: application/x-www-form-urlencoded'), ); curl_setopt_array($ch, $options); $result = curl_exec($ch); echo $result; ?>
<?php $urls = array( '/pages/index1?id=1', '/pages/index2', ); $data['url_list'] = implode(",", $urls); $api = 'https://openapi.baidu.com/rest/2.0/smartapp/access/submitsitemap/api?access_token=xxx'; $ch = curl_init(); $options = array( CURLOPT_URL => $api, CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_NOBODY => false, CURLOPT_POSTFIELDS => http_build_query($data), CURLOPT_HTTPHEADER => array('Content-Type: application/x-www-form-urlencoded'), ); curl_setopt_array($ch, $options); $result = curl_exec($ch); echo $result; ?>
No branches or pull requests
在发送数据的时候,如果一次发送比较多的数据,数据直接跟在url之后,发送的数据在body中,目前不支持post,文档中写的支持,是怎么回事?
请求路径:POST
https://openapi.baidu.com/rest/2.0/smartapp/access/submitsitemap/api?access_token=ACCESS_TOKEN
The text was updated successfully, but these errors were encountered: