@@ -120,6 +120,7 @@ protected function response($response) {
120
120
* @return object Preprocessed structured object.
121
121
*/
122
122
public function get ($ path , Array $ path_args = [], Array $ data = []) {
123
+ $ this ->setHTTPClient ();
123
124
parent ::get ($ path , $ path_args , $ data );
124
125
$ this ->setHeaders (
125
126
[
@@ -139,6 +140,7 @@ public function get($path, Array $path_args = [], Array $data = []) {
139
140
* @return object Preprocessed structured object and returns 204 No Content on success, with no response body.
140
141
*/
141
142
public function delete ($ path , Array $ path_args = [], Array $ data = []) {
143
+ $ this ->setHTTPClient ();
142
144
parent ::delete ($ path , $ path_args , $ data );
143
145
$ this ->setHeaders (
144
146
[
@@ -167,6 +169,7 @@ public function delete($path, Array $path_args = [], Array $data = []) {
167
169
* @return object Preprocessed structured object.
168
170
*/
169
171
public function post ($ path , Array $ path_args , Array $ data = []) {
172
+ $ this ->setHTTPClient ();
170
173
parent ::post ($ path , $ path_args , $ data );
171
174
172
175
// JSON string to be posted to PublisherAPI instead of article.json file.
@@ -218,8 +221,8 @@ public function post($path, Array $path_args, Array $data = []) {
218
221
$ info ['contents ' ]
219
222
);
220
223
}
221
-
222
- if (!empty ($ multiparts )) {
224
+
225
+ if (!empty ($ multiparts )) {
223
226
// Set content type and boundary token.
224
227
$ content_type = sprintf ('multipart/form-data; boundary=%s ' , $ this ->boundary );
225
228
0 commit comments