| [ Index ] |
PHP Cross Reference of YOURLS |
[Source view] [Print] [Project Stats]
HTTP response class Contains a response from \WpOrg\Requests\Requests::request()
| File Size: | 165 lines (4 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
Response:: (4 methods):
__construct()
is_redirect()
throw_for_status()
decode_body()
| __construct() X-Ref |
| Constructor |
| is_redirect() X-Ref |
| Is the response a redirect? return: boolean True if redirect (3xx status), false if not. |
| throw_for_status($allow_redirects = true) X-Ref |
| Throws an exception if the request was not successful param: boolean $allow_redirects Set to false to throw on a 3xx as well |
| decode_body($associative = true, $depth = 512, $options = 0) X-Ref |
| JSON decode the response body. The method parameters are the same as those for the PHP native `json_decode()` function. param: bool|null $associative Optional. When `true`, JSON objects will be returned as associative arrays; param: int $depth Optional. Maximum nesting depth of the structure being decoded. param: int $options Optional. Bitmask of JSON_BIGINT_AS_STRING, JSON_INVALID_UTF8_IGNORE, return: array |
| Generated: Wed Nov 5 05:10:36 2025 | Cross-referenced by PHPXref 0.7.1 |