- class
HttpRequest
(httpclient\HttpRequest
) - source
httpclient/HttpRequest.php
Description
Class HttpRequest
->
method
:string
->
type
:string|null
->
responseType
:string|null
->
url
:string
->
body
:mixed
->
headers
:array
->
cookies
:array
->
userAgent
:null|string
->
bodyParser
:null|callable
->
absoluteUrl
:bool
->
__construct()
- HttpRequest constructor.->
method()
->
absoluteUrl()
->
url()
->
body()
->
userAgent()
->
type()
- NONE, XML, JSON, TEXT, URLENCODE, MULTIPART, STREAM->
responseType()
- XML, JSON, TEXT, STREAM->
cookies()
->
headers()
->
contentType()
->
bodyParser()
__construct(string $method, string $url, array $headers, null $body): void
HttpRequest constructor.
method([ null|string $method): string
absoluteUrl([ bool|null $value): bool|null
url([ null|string $url): null|string
body(null|mixed $data): mixed
userAgent([ null|string $userAgent): null|string
type([ null|string $type): string
NONE, XML, JSON, TEXT, URLENCODE, MULTIPART, STREAM
responseType([ null|string $type): string
XML, JSON, TEXT, STREAM
cookies([ array|null $cookies): array|null
headers([ array|null $headers): array|null
contentType([ null|string $contentType): null|string
bodyParser([ callable|null $callback): callable|null