WP_HTTP_Response::get_status() WordPress Method
The WP_HTTP_Response::get_status() method allows you to get the current HTTP status code for the response. This is useful for debugging or for making sure that the correct status code is being returned for the request.
WP_HTTP_Response::get_status() #
Retrieves the HTTP return code for the response.
Return
(int) The 3-digit HTTP status code.
Source
File: wp-includes/class-wp-http-response.php
public function get_status() { return $this->status; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |