(string) $response->getBody(); // Check if we received errors, and add those to the Exception for convenience throw new GoogleServiceException($body, $code, null, self::getResponseErrors($body)); } // Ensure we only pull the entire body into memory if the request is not // of media type $body = self::decodeBody($response, $request); if ($expectedClass = self::determineExpectedClass($expectedClass, $request)) { $json = \json_decode($body, \true); return new $expectedClass($json); } return $response; } private static function decodeBody(ResponseInterface $response, RequestInterface $request = null) { if (self::isAltMedia($request)) { // don't decode the body, it's probably a really long string return ''; } return (string) $response->getBody(); } private static function determineExpectedClass($expectedClass, RequestInterface $request = null) { // "false" is used to explicitly prevent an expected class from being returned if (\false === $expectedClass) { return null; } // if we don't have a request, we just use what's passed in if (null === $request) { return $expectedClass; } // return what we have in the request header if one was not supplied return $expectedClass ?: $request->getHeaderLine('X-Php-Expected-Class'); } private static function getResponseErrors($body) { $json = \json_decode($body, \true); if (isset($json['error']['errors'])) { return $json['error']['errors']; } return null; } private static function isAltMedia(RequestInterface $request = null) { if ($request && ($qs = $request->getUri()->getQuery())) { \parse_str($qs, $query); if (isset($query['alt']) && $query['alt'] == 'media') { return \true; } } return \false; } }
Warning: Class "ElementskitVendor\Google\Http\REST" not found in /htdocs/wp-content/plugins/elementskit/libs/composer/vendor/build/vendor/src/google/apiclient/src/aliases.php on line 12

Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wp-content/plugins/elementskit/libs/composer/vendor/build/vendor/src/google/apiclient/src/Http/REST.php:1) in /htdocs/wp-content/plugins/royal-elementor-addons/plugin.php on line 441
Minimal Archives - RESPETH

Warning: Undefined array key "student_url_profile" in /htdocs/wp-content/plugins/masterstudy-lms-learning-management-system/_core/lms/helpers.php on line 1340

Warning: Undefined array key "student_url_profile" in /htdocs/wp-content/plugins/masterstudy-lms-learning-management-system/_core/lms/helpers.php on line 1345

Appuyez sur ESC pour fermer

L’activation de la sortie du chalet a été entrée pour empêcher grandement le message.