Set the request body fomrat.

@param string $format

@return \BrianFaust\Http\PendingHttpRequest
326292
public function bodyFormat(string $format): self
    {
        return tap($this, function ($request) use ($format) {
            $this->bodyFormat = $format;
        });
    }
1110673
public function setFormat($name, FormatInterface $format)
    {
        // If name is int or null, get name from Format object.
        $name = (is_numeric($name) || !$name) ? $format->getName() : $name;

        $this->formats[$name] = $format;

        return $this;
    }
1344272
public function setFormats($formats)
    {
        $this->formats = Type::forceAndReturn($formats, ArrayAccess::class);
        $this->formatCache = [];
        return $this;
    }
697210
public function load($data, $format = 'php')
    {
        if (!$data) {
            return $this;
        }

        if (\is_string($data) && \in_array($format, static::$formats, true)) {
            switch ($format) {
                case static::FORMAT_YML:
                    $this->loadYaml($data);
                    break;

                case static::FORMAT_JSON:
                    $this->loadJson($data);
                    break;

                case static::FORMAT_INI:
                    $this->loadIni($data);
                    break;

                case static::FORMAT_PHP:
                default:
                    $this->loadArray($data);
                    break;
            }

        } elseif (\is_array($data) || \is_object($data)) {
            $this->bindData($this->data, $data);
        }

        return $this;
    }
776327
public function setFormats($formats)
    {
        foreach ($formats as $type => $format) {
            $this->setFormat($type, $format);
        }

        return $this;
    }
64607
public function setFormat($format)
    {
        if ($format !== self::FORMAT_BINARY && $format !== self::FORMAT_TEXT) {
            throw new InvalidArgumentException("Invalid message format");
        }

        $this->format = $format;
    }
994203
public function format(string $format) : self
    {
        if (! in_array($format, self::VALID_FORMATS)) {
            throw new Exception('Invalid format provided to path.');
        }

        $this->format = $format;

        return $this;
    }
889178
public function setResponseFormat($format)
    {
        $format = strtolower($format);
        if (!in_array($format, array('php', 'json', 'jsonp'))) {
            throw new Exception("Expected a format of php, json or jsonp, got '$format'");
        } else {
            $this->responseFormat = $format;
        }
    }
550213
public function export($format = FilledFormExportFormat::JSON)
    {
        if (! $format instanceof FilledFormExportFormat) {
            $format = new FilledFormExportFormat($format);
        }

        return static::query($this->client, [$this->filled_form_id, self::EXPORT], ['format' => $format->getValue()]);
    }
1198378
public function setFormat(string $format = \null)
    {
        $validValues = ['png', 'jpg', 'webp'];

        if (\null !== $format && !\in_array($format, $validValues, \true)) {
            throw new \InvalidArgumentException(\sprintf(
                'Unknown format "%s" given. Expected "%s" or null.',
                $format,
                \implode(', ', $validValues)
            ));
        }

        $this->format = $format;

        return $this;
    }
905167
public function getDateTimeFormat(string $format='Y-m-d H:i:s')
    {
        $this->setDateTimeZone()->setDateTime();

        return $this->dateTime->format($format);
    }
1293996
public function format($format = true)
    {
        if (!is_bool($format)) {
            throw new InvalidArgumentException(sprintf('%s expects parameter 1 to be boolean, %s given', __METHOD__, gettype($format)));
        }

        $this->document->formatOutput = $format;

        return $this;
    }
512619
public static function getPort(ServerRequestInterface $request, string $format): string
    {
        switch ($format) {
            case 'canonical':
            case 'local':
                return (string) ($request->getUri()->getPort()
                    ?: ('https' === $request->getUri()->getScheme() ? 443 : 80));
            default:
                return '-';
        }
    }
1278619
public function add($value, $format = '(%s)')
	{
		array_push($this->pattern, sprintf($format, $this->sanitize($value)));

		return $this;
	}
824489
public function setNotificationAttrFormat($format = "normalized") {
        if(!isset($this->_subscription->notification)){
            $this->_subscription->notification = (object) [];
        }

        $possibleValues = ["normalized", "keyValues", "values"];
        if (!in_array($possibleValues, $format)) {
            throw new \Exception("Not supported format");
        }
        $this->_subscription->notification->attrsFormat = $format;
        return $this;
    }
454189
public function setFormat($format) {
        $upperFormat = strtoupper($format);
        $this->searchParams->config->searchFormat = array_search($upperFormat, SearchFormat::$__names);
    }
242438
public function setTimeFormat($format) {
        if (is_string($format)) {
            $this->timeFormatter = function ($t) use ($format) {
                return strftime($format, $t);
            };
        } else {
            $this->timeFormatter = $format;
        }

        return $this;
    }