GC_Http::post()

最后更新于:2021-12-01 11:13:45

GC_( string$url, string|array$args=array())

Uses the POST HTTP method.

参数

$url

(string) (Required) The request URL.

$args

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

Default value: array()

响应

(array|GC_Error) Array containing ‘headers’, ‘body’, ‘response’, ‘cookies’, ‘filename’. A GC_Error instance upon error.

源文件

文件: gc-includes/class-http.php

	public function post( $url, $args = array() ) {
		$defaults    = array( 'method' => 'POST' );
		$parsed_args = gc_parse_args( $args, $defaults );
		return $this->request( $url, $parsed_args );
	}