Type of “application/json” prevents post variables from being sent
问题 I've found that if I try a PHP POST curl, the postvars are sent fine. Once I add the httpheader of content-type: application/json the postvars don't go across any more. I've tried the postvars as a JSON string and as a query string. Showing some code: $ch = curl_init(); $post = json_encode(array('p1' => 'blahblahblah', 'p2' => json_encode(array(4,5,6)))); $arr = array(); array_push($arr, 'Content-Type: application/json; charset=utf-8'); curl_setopt($ch, CURLOPT_HTTPHEADER, $arr); curl_setopt(