Syntax
- $response = wp_remote_get( $url, $args );
- $response = wp_remote_post( $url, $args );
- $response = wp_safe_remote_post( $url, $args );
Parameters
Parameter | Details |
---|
$url | (string) (Required) Site URL to retrieve. |
$args | (array) (Optional) Request arguments. |
Returns
(WP_Error | array) The response as an array, or WP_Error on failure.