Retrieves the raw response from a safe HTTP request using the POST method.
Description
This function is ideal when the HTTP request is being made to an arbitrary URL. The URL, and every URL it redirects to, are validated with wp_http_validate_url() to avoid Server Side Request Forgery attacks (SSRF). The only supported protocols are http and https.
Parameters
$urlstring
URL to retrieve.
$argsarrayoptional
Request arguments. Default empty array. See WP_Http::request() for information on accepted arguments.Default: array()
Return
array|WP_Error
The response or WP_Error on failure. See WP_Http::request() for information on return value.
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 7.0.4 tag, from src/wp-includes/http.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.