Open Journal Systems  3.3.0
Guzzle\Http\Message\EntityEnclosingRequestInterface Interface Reference
Inheritance diagram for Guzzle\Http\Message\EntityEnclosingRequestInterface:
Guzzle\Http\Message\RequestInterface Guzzle\Http\Message\MessageInterface Guzzle\Common\HasDispatcherInterface Guzzle\Http\Message\EntityEnclosingRequest

Public Member Functions

 addPostFields ($fields)
 
 addPostFile ($field, $filename=null, $contentType=null, $postname=null)
 
 addPostFiles (array $files)
 
 configureRedirects ($strict=false, $maxRedirects=5)
 
 getBody ()
 
 getPostField ($field)
 
 getPostFields ()
 
 getPostFile ($fieldName)
 
 getPostFiles ()
 
 removePostField ($field)
 
 removePostFile ($fieldName)
 
 setBody ($body, $contentType=null)
 
 setPostField ($key, $value)
 
- Public Member Functions inherited from Guzzle\Http\Message\RequestInterface
 __toString ()
 
 addCookie ($name, $value)
 
 getClient ()
 
 getCookie ($name)
 
 getCookies ()
 
 getCurlOptions ()
 
 getHost ()
 
 getMethod ()
 
 getPassword ()
 
 getPath ()
 
 getPort ()
 
 getProtocolVersion ()
 
 getQuery ()
 
 getResource ()
 
 getResponse ()
 
 getResponseBody ()
 
 getScheme ()
 
 getState ()
 
 getUrl ($asObject=false)
 
 getUsername ()
 
 removeCookie ($name)
 
 send ()
 
 setAuth ($user, $password='', $scheme='Basic')
 
 setClient (ClientInterface $client)
 
 setHost ($host)
 
 setPath ($path)
 
 setPort ($port)
 
 setProtocolVersion ($protocol)
 
 setResponse (Response $response, $queued=false)
 
 setResponseBody ($body)
 
 setScheme ($scheme)
 
 setState ($state, array $context=array())
 
 setUrl ($url)
 
 startResponse (Response $response)
 
- Public Member Functions inherited from Guzzle\Http\Message\MessageInterface
 addHeader ($header, $value)
 
 addHeaders (array $headers)
 
 getHeader ($header)
 
 getHeaderLines ()
 
 getHeaders ()
 
 getParams ()
 
 getRawHeaders ()
 
 hasHeader ($header)
 
 removeHeader ($header)
 
 setHeader ($header, $value)
 
 setHeaders (array $headers)
 
- Public Member Functions inherited from Guzzle\Common\HasDispatcherInterface
 addSubscriber (EventSubscriberInterface $subscriber)
 
 dispatch ($eventName, array $context=array())
 
 getEventDispatcher ()
 
 setEventDispatcher (EventDispatcherInterface $eventDispatcher)
 

Data Fields

const MULTIPART = 'multipart/form-data'
 
const URL_ENCODED = 'application/x-www-form-urlencoded; charset=utf-8'
 
- Data Fields inherited from Guzzle\Http\Message\RequestInterface
const CONNECT = 'CONNECT'
 
const DELETE = 'DELETE'
 
const GET = 'GET'
 
const HEAD = 'HEAD'
 
const OPTIONS = 'OPTIONS'
 
const PATCH = 'PATCH'
 
const POST = 'POST'
 
const PUT = 'PUT'
 
const STATE_COMPLETE = 'complete'
 
const STATE_ERROR = 'error'
 
const STATE_NEW = 'new'
 
const STATE_TRANSFER = 'transfer'
 
const TRACE = 'TRACE'
 

Additional Inherited Members

- Static Public Member Functions inherited from Guzzle\Common\HasDispatcherInterface
static getAllEvents ()
 

Detailed Description

HTTP request that sends an entity-body in the request message (POST, PUT)

Definition at line 12 of file EntityEnclosingRequestInterface.php.

Member Function Documentation

◆ addPostFields()

Guzzle\Http\Message\EntityEnclosingRequestInterface::addPostFields (   $fields)

Add POST fields to use in the request

Parameters
QueryString | array$fieldsPOST fields
Returns
self

Implemented in Guzzle\Http\Message\EntityEnclosingRequest.

◆ addPostFile()

Guzzle\Http\Message\EntityEnclosingRequestInterface::addPostFile (   $field,
  $filename = null,
  $contentType = null,
  $postname = null 
)

Add a POST file to the upload

Parameters
string$fieldPOST field to use (e.g. file). Used to reference content from the server.
string$filenameFull path to the file. Do not include the @ symbol.
string$contentTypeOptional Content-Type to add to the Content-Disposition. Default behavior is to guess. Set to false to not specify.
string$postnameThe name of the file, when posted. (e.g. rename the file)
Returns
self

Implemented in Guzzle\Http\Message\EntityEnclosingRequest.

◆ addPostFiles()

Guzzle\Http\Message\EntityEnclosingRequestInterface::addPostFiles ( array  $files)

Add POST files to use in the upload

Parameters
array$filesAn array of POST fields => filenames where filename can be a string or PostFileInterface
Returns
self

Implemented in Guzzle\Http\Message\EntityEnclosingRequest.

◆ configureRedirects()

Guzzle\Http\Message\EntityEnclosingRequestInterface::configureRedirects (   $strict = false,
  $maxRedirects = 5 
)

Configure how redirects are handled for the request

Parameters
bool$strictSet to true to follow strict RFC compliance when redirecting POST requests. Most browsers with follow a 301-302 redirect for a POST request with a GET request. This is the default behavior of Guzzle. Enable strict redirects to redirect these responses with a POST rather than a GET request.
int$maxRedirectsSpecify the maximum number of allowed redirects. Set to 0 to disable redirects.
Returns
self

Implemented in Guzzle\Http\Message\EntityEnclosingRequest.

◆ getBody()

Guzzle\Http\Message\EntityEnclosingRequestInterface::getBody ( )

◆ getPostField()

Guzzle\Http\Message\EntityEnclosingRequestInterface::getPostField (   $field)

Get a POST field from the request

Parameters
string$fieldField to retrieve
Returns
mixed|null

Implemented in Guzzle\Http\Message\EntityEnclosingRequest.

◆ getPostFields()

Guzzle\Http\Message\EntityEnclosingRequestInterface::getPostFields ( )

Get the post fields that will be used in the request

Returns
QueryString

Implemented in Guzzle\Http\Message\EntityEnclosingRequest.

◆ getPostFile()

Guzzle\Http\Message\EntityEnclosingRequestInterface::getPostFile (   $fieldName)

Get a POST file from the request

Parameters
string$fieldNamePOST fields to retrieve
Returns
array|null Returns an array wrapping an array of PostFileInterface objects

Implemented in Guzzle\Http\Message\EntityEnclosingRequest.

◆ getPostFiles()

Guzzle\Http\Message\EntityEnclosingRequestInterface::getPostFiles ( )

Returns an associative array of POST field names to PostFileInterface objects

Returns
array

Implemented in Guzzle\Http\Message\EntityEnclosingRequest.

◆ removePostField()

Guzzle\Http\Message\EntityEnclosingRequestInterface::removePostField (   $field)

Remove a POST field or file by name

Parameters
string$fieldName of the POST field or file to remove
Returns
self

Implemented in Guzzle\Http\Message\EntityEnclosingRequest.

◆ removePostFile()

Guzzle\Http\Message\EntityEnclosingRequestInterface::removePostFile (   $fieldName)

Remove a POST file from the request

Parameters
string$fieldNamePOST file field name to remove
Returns
self

Implemented in Guzzle\Http\Message\EntityEnclosingRequest.

◆ setBody()

Guzzle\Http\Message\EntityEnclosingRequestInterface::setBody (   $body,
  $contentType = null 
)

Set the body of the request

Parameters
string | resource | EntityBodyInterface$bodyBody to use in the entity body of the request
string$contentTypeContent-Type to set. Leave null to use an existing Content-Type or to guess the Content-Type
Returns
self
Exceptions
RequestExceptionif the protocol is < 1.1 and Content-Length can not be determined

Implemented in Guzzle\Http\Message\EntityEnclosingRequest.

◆ setPostField()

Guzzle\Http\Message\EntityEnclosingRequestInterface::setPostField (   $key,
  $value 
)

Set a POST field value

Parameters
string$keyKey to set
string$valueValue to set
Returns
self

Implemented in Guzzle\Http\Message\EntityEnclosingRequest.

Field Documentation

◆ MULTIPART

const Guzzle\Http\Message\EntityEnclosingRequestInterface::MULTIPART = 'multipart/form-data'

Definition at line 15 of file EntityEnclosingRequestInterface.php.

◆ URL_ENCODED

const Guzzle\Http\Message\EntityEnclosingRequestInterface::URL_ENCODED = 'application/x-www-form-urlencoded; charset=utf-8'

Definition at line 14 of file EntityEnclosingRequestInterface.php.


The documentation for this interface was generated from the following file: