Changeset View
Changeset View
Standalone View
Standalone View
src/conduit/ConduitClient.php
Show First 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | $data = array( | ||||
// response. It is not necessary, but provides better error messages in | // response. It is not necessary, but provides better error messages in | ||||
// some cases. | // some cases. | ||||
'__conduit__' => true, | '__conduit__' => true, | ||||
); | ); | ||||
// Always use the cURL-based HTTPSFuture, for proxy support and other | // Always use the cURL-based HTTPSFuture, for proxy support and other | ||||
// protocol edge cases that HTTPFuture does not support. | // protocol edge cases that HTTPFuture does not support. | ||||
$core_future = new HTTPSFuture($uri, $data); | $core_future = new HTTPSFuture($uri, $data); | ||||
$core_future->addHeader('Host', $this->getHost()); | $core_future->addHeader('Host', $this->getHostString()); | ||||
$core_future->setMethod('POST'); | $core_future->setMethod('POST'); | ||||
$core_future->setTimeout($this->timeout); | $core_future->setTimeout($this->timeout); | ||||
if ($this->username !== null) { | if ($this->username !== null) { | ||||
$core_future->setHTTPBasicAuthCredentials( | $core_future->setHTTPBasicAuthCredentials( | ||||
$this->username, | $this->username, | ||||
$this->password); | $this->password); | ||||
▲ Show 20 Lines • Show All 208 Lines • Show Last 20 Lines |