WP_Http::post( string $url, string|array $args = array() )
Uses the POST HTTP method.
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
public function post( $url, $args = array() ) { $defaults = array( 'method' => 'POST' ); $parsed_args = wp_parse_args( $args, $defaults ); return $this->request( $url, $parsed_args ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
2.7.0 | Introduced. |