php發送http請求的請求參數類型可以為:
1、content_type: application/json
2、content_type: application/x-www-form-urlencoded;charset=UTF-8
對於json類型的數據:在php中使用json_encode進行轉義
對於第二種數據類型:使用php函數http_build_query進行轉換
$input = http_build_query($payload);
php發送http請求的請求參數類型可以為:
1、content_type: application/json
2、content_type: application/x-www-form-urlencoded;charset=UTF-8
對於json類型的數據:在php中使用json_encode進行轉義
對於第二種數據類型:使用php函數http_build_query進行轉換
$input = http_build_query($payload);
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。