On this page
wp_remote_post( string $url, array $args = array() ): array|WP_Error
Performs an HTTP request using the POST method and returns its response.
Description
See also
- wp_remote_request() : For more information on the response array format.
- WP_Http::request(): For default arguments information.
Parameters
$urlstring Required-
URL to retrieve.
$argsarray Optional-
Request arguments.
Default:
array()
Return
Source
File: wp-includes/http.php. View all references
function wp_remote_post( $url, $args = array() ) {
$http = _wp_http_get_object();
return $http->post( $url, $args );
}
Related
Uses
| Uses | Description |
|---|---|
| _wp_http_get_object() wp-includes/http.php | Returns the initialized WP_Http Object |
Used By
| Used By | Description |
|---|---|
| WP_Site_Health::wp_cron_scheduled_check() wp-admin/includes/class-wp-site-health.php | Runs the scheduled event to check and update the latest site health status for the website. |
| WP_Site_Health::can_perform_loopback() wp-admin/includes/class-wp-site-health.php | Runs a loopback test on the site. |
| translations_api() wp-admin/includes/translation-install.php | Retrieve translations from WordPress Translation API. |
| wp_check_browser_version() wp-admin/includes/dashboard.php | Checks if the user needs a browser update. |
| update_core() wp-admin/includes/update-core.php | Upgrades the core of WordPress. |
| spawn_cron() wp-includes/cron.php | Sends a request to run cron through HTTP request that doesn’t halt page loading. |
| wp_version_check() wp-includes/update.php | Checks WordPress version against the newest version. |
| wp_update_plugins() wp-includes/update.php | Checks for available updates to plugins based on the latest versions hosted on WordPress.org. |
| wp_update_themes() wp-includes/update.php | Checks for available updates to themes based on the latest versions hosted on WordPress.org. |
| WP_HTTP_IXR_Client::query() wp-includes/class-wp-http-ixr-client.php |
Changelog
| Version | Description |
|---|---|
| 2.7.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_remote_post