Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/PublisherAPI/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ protected function response($response) {
* @return object Preprocessed structured object.
*/
public function get($path, Array $path_args = [], Array $data = []) {
$this->setHTTPClient();
parent::get($path, $path_args, $data);
$this->setHeaders(
[
Expand All @@ -139,6 +140,7 @@ public function get($path, Array $path_args = [], Array $data = []) {
* @return object Preprocessed structured object and returns 204 No Content on success, with no response body.
*/
public function delete($path, Array $path_args = [], Array $data = []) {
$this->setHTTPClient();
parent::delete($path, $path_args, $data);
$this->setHeaders(
[
Expand Down Expand Up @@ -167,6 +169,7 @@ public function delete($path, Array $path_args = [], Array $data = []) {
* @return object Preprocessed structured object.
*/
public function post($path, Array $path_args, Array $data = []) {
$this->setHTTPClient();
parent::post($path, $path_args, $data);

// JSON string to be posted to PublisherAPI instead of article.json file.
Expand Down