Read data from the request body and send it to curl
resource $ch Curl handle:
resource $fd File descriptor:
int $length Amount of data to read:
string
public function readRequestBody($ch, $fd, $length) {
$read = '';
if ($this->request
->getBody()) {
$read = $this->request
->getBody()
->read($length);
if ($this->emitIo) {
$this->request
->dispatch('curl.callback.read', array(
'request' => $this->request,
'read' => $read,
));
}
}
return !$read ? '' : $read;
}