Method | Description | |
---|---|---|
__construct ( string $boundary = null ) | ||
addField ( string $name, string $value, string $contentType = 'text/plain' ) : self | Add a data field to the form entity body | |
addFields ( array $data, string $contentType = 'text/plain' ) : self | Add each element of a associative array as a data field to the form entity body | |
addFile ( string $name, string $filePath, string $contentType = 'application/octet-stream' ) : self | Add a file field to the form entity body | |
addFiles ( array $data, string $contentType = 'application/octet-stream' ) : self | Add each element of a associative array as a file field to the form entity body | |
getBody ( ) : Amp\Promise | Retrieve the sendable Amp\Artax entity body representation | |
getHeaders ( ) : Amp\Promise | Retrieve a key-value array of headers to add to the outbound request | |
getLength ( ) : Amp\Promise | Retrieve the content length of the form entity body |
Method | Description | |
---|---|---|
determineContentType ( ) | ||
generateMultipartFieldHeader ( $name, $contentType ) | ||
generateMultipartFileHeader ( $name, $fileName, $contentType ) | ||
generateMultipartIteratorFromFields ( array $fields ) | ||
getFormEncodedBodyString ( ) | ||
getMultipartFieldArray ( ) | ||
sumMultipartFieldLengths ( array $fields ) |
public __construct ( string $boundary = null ) | ||
$boundary | string | An optional multipart boundary string |
public getBody ( ) : Amp\Promise | ||
return | Amp\Promise |
public getHeaders ( ) : Amp\Promise | ||
return | Amp\Promise |
public getLength ( ) : Amp\Promise | ||
return | Amp\Promise |