Enviar json no body com curl
Galera, estou precisando enviar um json via curl no body da aplicação. Como fazer?
fiz algo do tipo e retorna null. Quando uso o
curl_setopt ($this->ch, CURLOPT_COOKIEJAR, $this->dir);
curl_setopt ($this->ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($this->ch, CURLOPT_URL, $url);
curl_setopt($this->ch, CURLOPT_POST, true);
curl_setopt($this->ch, CURLOPT_POSTFIELDS, $parm);
curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, false);
$this->result = $this->exec();
Postman funciona corretamenteDiscussão (4)
Carregando comentários...