public $cfg;
protected $uploadsInfo = [];
+ protected $dedicatedBody = false;
public function __construct($host, $cfg)
{
public function send($body = null)
{
if ($body !== null) {
+ $this->dedicatedBody = true;
$this->req->setBody($body);
}
if ($this->cfg->debug) {
}
}
+ if ($this->dedicatedBody) {
+ $command .= ' --data ' . escapeshellarg($this->req->getBody());
+ }
+
$command .= ' ' . escapeshellarg((string) $this->req->getUrl());
Log::msg($command);