Codex

Function Reference/wp remote get

This page is marked as incomplete. You can help Codex by expanding it.

Contents

Description

Retrieve the raw response from the HTTP request using the GET method.

Usage

<?php $response wp_remote_get($url$args = array()) ?>

Parameters

$url
(string) (required) Site URL to retrieve.
Default: None
$args
(array) (optional) Override the defaults.
Default: None

See wp_remote_request() for more information on the arguments array format.

Return Values

(WP_Error|array) 
The response or WP_Error on failure.

Examples

Notes

Change Log

Since: 2.7.0

Source File

wp_remote_get() is located in wp-includes/http.php

Related

wp_remote_request()