WonderPush PHP library
  • Namespace
  • Class
Navigation
  • Namespace
  • Class
Namespaces
  • WonderPush
    • Api
    • Errors
    • Net
    • Obj
    • Params
    • Util
Classes
  • CurlHttpClient
  • Request
  • Response
Interfaces
  • HttpClientInterface

Class Request

Represents an HTTP request.

WonderPush\Obj\BaseObject implements WonderPush\Util\JsonSerializable
┗ WonderPush\Net\Request
Namespace: WonderPush\Net
Located at Net/Request.php

Methods summary

public getMethod( void ) : string

The HTTP method.

The HTTP method.

Returns

string
One of the constants of this class.
public setMethod( string $method ) : WonderPush\Net\Request

Set the HTTP method.

Set the HTTP method.

Parameters

$method
One of the constants of this class.

Returns

WonderPush\Net\Request
public getRoot( void ) : string

The scheme, host, port and potential path prefix of the request.

The scheme, host, port and potential path prefix of the request.

Should not end with a slash.

Returns

string
public setRoot( string $root ) :

Set the scheme, host, port and potential path prefix of the request.

Set the scheme, host, port and potential path prefix of the request.

Should not end with a slash.

Parameters

$root

Returns


$this
public getPath( void ) : string

The HTTP path.

The HTTP path.

Should start with a slash.

Returns

string
public setPath( string $path ) :

Set the HTTP path.

Set the HTTP path.

Should start with a slash.

Parameters

$path

Returns


$this
public getQsParams( void ) : mixed[]

The query string parameters.

The query string parameters.

These parameters will not be promoted to body parameters.

Returns

mixed[]
public setQsParams( mixed[] $qsParams ) :

Set the query string parameters.

Set the query string parameters.

These parameters will not be promoted to body parameters.

Parameters

$qsParams

Returns


$this
public getParams( void ) : mixed[]

The body parameters.

The body parameters.

These parameters may be promoted to query string parameters, depending on the HTTP method used.

Returns

mixed[]
public setParams( mixed[] $params ) :

Set the body parameters.

Set the body parameters.

These parameters may be promoted to query string parameters, depending on the HTTP method used.

Parameters

$params

Returns


$this
public getHeaders( void ) : mixed[]

The HTTP headers.

The HTTP headers.

Returns

mixed[]
public setHeaders( mixed[] $headers ) :

Set the HTTP headers.

Set the HTTP headers.

Parameters

$headers

Returns


$this

Methods inherited from WonderPush\Obj\BaseObject

__construct(), __toString(), _new(), clearAllFields(), deepClone(), jsonSerialize(), toArray(), toData()

Constants summary

GET : string

HTTP GET method.

HTTP GET method.

'GET'
POST : string

HTTP POST method.

HTTP POST method.

'POST'
PUT : string

HTTP PUT method.

HTTP PUT method.

'PUT'
DELETE : string

HTTP DELETE method.

HTTP DELETE method.

'DELETE'
PATCH : string

HTTP PATCH method.

HTTP PATCH method.

'PATCH'
WonderPush PHP library API documentation generated by ApiGen