$filters
$filters : array
Form filters
HTTP client request class
$body : \Pop\Mime\Part\Body
Body
$fields : array
Fields (form fields and files) $fields = [ 'username' => 'admin' 'file1' => [ 'filename' => __DIR__ . '/path/to/file.txt', 'contentType' => 'text/plain' ], 'file2' => [ 'filename' => 'test.pdf', 'contentType' => 'application/pdf', 'contents' => file_get_contents(__DIR__ . '/path/to/test.pdf' ] ]
addFilter(mixed $filter) : \Pop\Filter\FilterableTrait
Add filter
mixed | $filter |
addFilters(array $filters) : \Pop\Filter\FilterableTrait
Add filters
array | $filters |
clearFilters() : \Pop\Filter\FilterableTrait
Clear filters
addHeader(\Pop\Mime\Part\Header|string $header, string $value = null) : \Pop\Http\AbstractHttp
Add a header
\Pop\Mime\Part\Header|string | $header | |
string | $value |
addHeaders(array $headers) : \Pop\Http\AbstractHttp
Add all headers
array | $headers |
removeHeader(string $name) : \Pop\Http\AbstractHttp
Remove a header
string | $name |
removeHeaders() : \Pop\Http\AbstractHttp
Remove all headers
setBody(string|\Pop\Mime\Part\Body $body) : \Pop\Http\AbstractHttp
Set the body
string|\Pop\Mime\Part\Body | $body |
getBody() : \Pop\Mime\Part\Body
Get the body
decodeBodyContent(string $body = null) : \Pop\Mime\Part\Body
Decode the body
string | $body |
removeBody() : \Pop\Http\AbstractHttp
Remove the body
setField(string $name, mixed $value) : \Pop\Http\Client\Request
Set a field
string | $name | |
mixed | $value |
setFields(array $fields) : \Pop\Http\Client\Request
Set all fields
array | $fields |
removeField(string $name) : \Pop\Http\Client\Request
Remove a field
string | $name |
createAsJson() : \Pop\Http\Client\Request
Create request as JSON
createUrlEncodedForm() : \Pop\Http\Client\Request
Create request as a URL-encoded form
createMultipartForm() : \Pop\Http\Client\Request
Create request as a multipart form