Request_Api::post( string $url, array $args, int $expect_code = self::POST_RESPONSE_CODE )
Makes a POST request to an API.
Contents
Parameters
- $url
-
(string) (Required) The URL to make the request to.
- $args
-
(array) (Required) An array of arguments for the request.
- $expect_code
-
(int) (Optional) The expected response code, if not met, then the request will be considered a failure. Set to
nullto avoid checking the status code.Default value: self::POST_RESPONSE_CODE
Return
(TribeEventsVirtualIntegrationsApi_Response) An API response to act upon the response result.
Source
File: src/Tribe/Integrations/Request_Api.php
public function post( $url, array $args, $expect_code = self::POST_RESPONSE_CODE ) {
$args['method'] = 'POST';
return $this->request( $url, $args, $expect_code );
}
Changelog
| Version | Description |
|---|---|
| 1.9.0 | Introduced. |