Changeset View
Changeset View
Standalone View
Standalone View
src/conduit/ConduitClient.php
| Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | if ($method == 'conduit.connect') { | ||||
| } | } | ||||
| unset($params['certificate']); | unset($params['certificate']); | ||||
| } | } | ||||
| if ($meta) { | if ($meta) { | ||||
| $params['__conduit__'] = $meta; | $params['__conduit__'] = $meta; | ||||
| } | } | ||||
| $uri = id(clone $this->uri)->setPath('/api/'.$method); | $uri = id(clone $this->uri); | ||||
| $path = $uri->getPath(); | |||||
| if ($path === '' || $path === '/') { | |||||
| $uri->setPath('/api/'); | |||||
| } | |||||
| $uri->appendPath($method); | |||||
| $data = array( | $data = array( | ||||
| 'params' => json_encode($params), | 'params' => json_encode($params), | ||||
| 'output' => 'json', | 'output' => 'json', | ||||
| // This is a hint to Phabricator that the client expects a Conduit | // This is a hint to Phabricator that the client expects a Conduit | ||||
| // 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. | ||||
| Show All 31 Lines | |||||