You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $request->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
142
+
thrownewApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, (string) $request->getUri()), $statusCode, $response->getHeaders(), (string)$response->getBody());
143
143
}
144
144
145
-
$responseBody = $response->getBody();
146
145
switch ($statusCode) {
147
146
case200:
148
147
if ('\Sigwin\RedditClient\Model\ListingEnvelope' === '\SplFileObject') {
149
-
$content = $responseBody; //stream goes to serializer
148
+
$content = $response->getBody(); //stream goes to serializer
150
149
} else {
151
-
$content = (string) $responseBody;
150
+
$content = (string) $response->getBody();
152
151
}
153
152
154
153
return [
@@ -159,11 +158,10 @@ public function getSavedWithHttpInfo($username, $after = null, $before = null, $
$content = $responseBody; //stream goes to serializer
231
+
$content = $response->getBody(); //stream goes to serializer
235
232
} else {
236
-
$content = (string) $responseBody;
233
+
$content = (string) $response->getBody();
237
234
}
238
235
239
236
return [
@@ -245,7 +242,7 @@ static function ($response) use ($returnType) {
245
242
staticfunction ($exception): void {
246
243
$response = $exception->getResponse();
247
244
$statusCode = $response->getStatusCode();
248
-
thrownewApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
245
+
thrownewApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody());
249
246
}
250
247
);
251
248
}
@@ -411,22 +408,21 @@ public function meWithHttpInfo(): array
thrownewApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $request->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
417
+
thrownewApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, (string) $request->getUri()), $statusCode, $response->getHeaders(), (string)$response->getBody());
421
418
}
422
419
423
-
$responseBody = $response->getBody();
424
420
switch ($statusCode) {
425
421
case200:
426
422
if ('\Sigwin\RedditClient\Model\Me' === '\SplFileObject') {
427
-
$content = $responseBody; //stream goes to serializer
423
+
$content = $response->getBody(); //stream goes to serializer
428
424
} else {
429
-
$content = (string) $responseBody;
425
+
$content = (string) $response->getBody();
430
426
}
431
427
432
428
return [
@@ -437,11 +433,10 @@ public function meWithHttpInfo(): array
437
433
}
438
434
439
435
$returnType = '\Sigwin\RedditClient\Model\Me';
440
-
$responseBody = $response->getBody();
441
436
if ($returnType === '\SplFileObject') {
442
-
$content = $responseBody; //stream goes to serializer
437
+
$content = $response->getBody(); //stream goes to serializer
443
438
} else {
444
-
$content = (string) $responseBody;
439
+
$content = (string) $response->getBody();
445
440
}
446
441
447
442
return [
@@ -503,11 +498,10 @@ public function meAsyncWithHttpInfo(): \GuzzleHttp\Promise\PromiseInterface
$content = $responseBody; //stream goes to serializer
502
+
$content = $response->getBody(); //stream goes to serializer
509
503
} else {
510
-
$content = (string) $responseBody;
504
+
$content = (string) $response->getBody();
511
505
}
512
506
513
507
return [
@@ -519,7 +513,7 @@ static function ($response) use ($returnType) {
519
513
staticfunction ($exception): void {
520
514
$response = $exception->getResponse();
521
515
$statusCode = $response->getStatusCode();
522
-
thrownewApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
516
+
thrownewApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody());
0 commit comments