Method
in package
Class Method.
Tags
Table of Contents
- CONNECT = 'CONNECT'
- The HTTP CONNECT method starts two-way communications with the requested resource. It can be used to open a tunnel.
- DELETE = 'DELETE'
- The HTTP DELETE request method deletes the specified resource.
- GET = 'GET'
- The HTTP GET method requests a representation of the specified resource.
- HEAD = 'HEAD'
- The HTTP HEAD method requests the headers that would be returned if the HEAD request's URL was instead requested with the HTTP GET method.
- OPTIONS = 'OPTIONS'
- The HTTP OPTIONS method requests permitted communication options for a given URL or server. A client can specify a URL with this method, or an asterisk (*) to refer to the entire server.
- PATCH = 'PATCH'
- The HTTP PATCH request method applies partial modifications to a resource.
- POST = 'POST'
- The HTTP POST method sends data to the server. The type of the body of the request is indicated by the Content-Type header.
- PUT = 'PUT'
- The HTTP PUT request method creates a new resource or replaces a representation of the target resource with the request payload.
- TRACE = 'TRACE'
- The HTTP TRACE method performs a message loop-back test along the path to the target resource, providing a useful debugging mechanism.
- $methods : array<string|int, mixed>
- validate() : string
Constants
CONNECT
The HTTP CONNECT method starts two-way communications with the requested resource. It can be used to open a tunnel.
public
string
CONNECT
= 'CONNECT'
Tags
DELETE
The HTTP DELETE request method deletes the specified resource.
public
string
DELETE
= 'DELETE'
Tags
GET
The HTTP GET method requests a representation of the specified resource.
public
string
GET
= 'GET'
Requests using GET should only be used to request data (they shouldn't include data).
Tags
HEAD
The HTTP HEAD method requests the headers that would be returned if the HEAD request's URL was instead requested with the HTTP GET method.
public
string
HEAD
= 'HEAD'
Tags
OPTIONS
The HTTP OPTIONS method requests permitted communication options for a given URL or server. A client can specify a URL with this method, or an asterisk (*) to refer to the entire server.
public
string
OPTIONS
= 'OPTIONS'
Tags
PATCH
The HTTP PATCH request method applies partial modifications to a resource.
public
string
PATCH
= 'PATCH'
Tags
POST
The HTTP POST method sends data to the server. The type of the body of the request is indicated by the Content-Type header.
public
string
POST
= 'POST'
Tags
PUT
The HTTP PUT request method creates a new resource or replaces a representation of the target resource with the request payload.
public
string
PUT
= 'PUT'
Tags
TRACE
The HTTP TRACE method performs a message loop-back test along the path to the target resource, providing a useful debugging mechanism.
public
string
TRACE
= 'TRACE'
Tags
Properties
$methods
protected
static array<string|int, mixed>
$methods
= ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE']
Methods
validate()
public
static validate(string $method) : string
Parameters
- $method : string