protected function EntityEnclosingRequest::processPostFields

Determine what type of request should be sent based on post fields

5 calls to EntityEnclosingRequest::processPostFields()
EntityEnclosingRequest::addPostFields in drupal/core/vendor/guzzle/http/Guzzle/Http/Message/EntityEnclosingRequest.php
Add POST fields to use in the request
EntityEnclosingRequest::addPostFile in drupal/core/vendor/guzzle/http/Guzzle/Http/Message/EntityEnclosingRequest.php
Add a POST file to the upload
EntityEnclosingRequest::removePostField in drupal/core/vendor/guzzle/http/Guzzle/Http/Message/EntityEnclosingRequest.php
Remove a POST field or file by name
EntityEnclosingRequest::removePostFile in drupal/core/vendor/guzzle/http/Guzzle/Http/Message/EntityEnclosingRequest.php
Remove a POST file from the request
EntityEnclosingRequest::setPostField in drupal/core/vendor/guzzle/http/Guzzle/Http/Message/EntityEnclosingRequest.php
Set a POST field value

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Message/EntityEnclosingRequest.php, line 285

Class

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

Namespace

Guzzle\Http\Message

Code

protected function processPostFields() {
  if (empty($this->postFiles)) {
    $this
      ->removeHeader('Expect')
      ->setHeader('Content-Type', self::URL_ENCODED);
  }
  else {
    $this
      ->setHeader('Content-Type', self::MULTIPART);
    if ($this->expectCutoff !== false) {
      $this
        ->setHeader('Expect', '100-Continue');
    }
  }
}