Show Curl POST Request Headers? Is there a way to do this?

前端 未结 5 612
情话喂你
情话喂你 2020-12-02 13:59

I\'m building a Curl web automation app and am having some issue with not getting the desired outcome of my POST action, I am having some trouble figuring out how I can show

5条回答
  •  死守一世寂寞
    2020-12-02 14:35

    You can save all headers sent by curl to a file using :

    $f = fopen('request.txt', 'w');
    curl_setopt($ch,CURLOPT_VERBOSE,true);
    curl_setopt($ch,CURLOPT_STDERR ,$f);
    

提交回复
热议问题