WP_Http::post

Advertisement

Summery Summery

Uses the POST HTTP method.

Syntax Syntax

WP_Http::post( string $url, string|array $args = array() )

Description Description

Used for sending data that is expected to be in the body.

Parameters Parameters

$url

(string) (Required) The request URL.

$args

(string|array) (Optional) Override the defaults.

Default value: array()

Return Return

(array|WP_Error) Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error.

Source Source

File: wp-includes/class-http.php

		return $this->request( $url, $parsed_args );
	}

	/**
	 * Uses the GET HTTP method.

Advertisement

Changelog Changelog

Changelog
Version Description
2.7.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.