Skip to content
This repository was archived by the owner on Nov 27, 2021. It is now read-only.

Commit b8462bc

Browse files
authored
Allow the object to do more than one request
chapter-three#19
1 parent 1312ecf commit b8462bc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/PublisherAPI/Curl.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ protected function response($response) {
120120
* @return object Preprocessed structured object.
121121
*/
122122
public function get($path, Array $path_args = [], Array $data = []) {
123+
$this->setHTTPClient();
123124
parent::get($path, $path_args, $data);
124125
$this->setHeaders(
125126
[
@@ -139,6 +140,7 @@ public function get($path, Array $path_args = [], Array $data = []) {
139140
* @return object Preprocessed structured object and returns 204 No Content on success, with no response body.
140141
*/
141142
public function delete($path, Array $path_args = [], Array $data = []) {
143+
$this->setHTTPClient();
142144
parent::delete($path, $path_args, $data);
143145
$this->setHeaders(
144146
[
@@ -167,6 +169,7 @@ public function delete($path, Array $path_args = [], Array $data = []) {
167169
* @return object Preprocessed structured object.
168170
*/
169171
public function post($path, Array $path_args, Array $data = []) {
172+
$this->setHTTPClient();
170173
parent::post($path, $path_args, $data);
171174

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

0 commit comments

Comments
 (0)