Свойство | Тип | Описание | |
---|---|---|---|
$body | string | ||
$curlOptions | array | ||
$headers | array | ||
$method | string | ||
$postFields | array | ||
$postFiles | array | ||
$url | string |
Метод | Описание | |
---|---|---|
__construct ( string $method, string $url, array $headers = [] ) | ||
addPostFile ( array $file ) | ||
fromArray ( array $request ) : |
Creates a new Request from a specified array. | |
getBody ( ) : string | ||
getCurlOption ( $key ) : mixed | ||
getCurlOptions ( ) : array | ||
getHeader ( $key ) : mixed | ||
getHeaders ( ) : array | ||
getHost ( ) : mixed | ||
getMethod ( ) : string | ||
getPath ( ) : mixed | ||
getPostFields ( ) : array | ||
getPostFiles ( ) : array | ||
getQuery ( ) : mixed | ||
getUrl ( ) : string | ||
matches ( |
Returns true if specified request matches the current one with specified request matcher callbacks. | |
removeHeader ( $key ) | ||
setAuthorization ( string $username, string $password ) | Sets the authorization credentials as header. | |
setBody ( string $body ) | ||
setCurlOption ( $key, $value ) | ||
setCurlOptions ( array $curlOptions ) | ||
setHeader ( $key, $value ) | ||
setMethod ( string $method ) | Sets the request method. | |
setPostField ( $key, $value ) | ||
setPostFields ( array $post_fields ) | ||
setPostFiles ( array $post_files ) | ||
setUrl ( string $url ) | ||
toArray ( ) : array | Returns an array representation of this request. |
public setAuthorization ( string $username, string $password ) | ||
$username | string | Username. |
$password | string | Password. |