Uses
Uses | Description |
---|---|
wp-includes/class-requests.php: Requests::request() | Main interface for HTTP requests |
wp-includes/Requests/Session.php: Requests_Session::merge_request() | Merge a request’s data with the default data |
Main interface for HTTP requests
This method initiates a request and sends it via a transport before parsing.
(string) (Required) URL to request
(array) (Optional) Extra headers to send with the request
Default value: array()
(array|null) (Optional) Data to send either as a query string for GET/HEAD requests, or in the body for POST requests
Default value: array()
(string) (Optional) HTTP request type (use Requests constants)
Default value: Requests::GET
(array) (Optional) Options for the request (see Requests::request)
Default value: array()
File: wp-includes/Requests/Session.php
public function request($url, $headers = array(), $data = array(), $type = Requests::GET, $options = array()) { $request = $this->merge_request(compact('url', 'headers', 'data', 'options')); return Requests::request($request['url'], $request['headers'], $request['data'], $type, $request['options']); }
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/requests_session/request