yii\httpclient\Response::defaultFormat PHP Method

defaultFormat() protected method

Returns default format automatically detected from headers and content.
protected defaultFormat ( ) : string | null
return string | null format name, 'null' - if detection failed.
    protected function defaultFormat()
    {
        $format = $this->detectFormatByHeaders($this->getHeaders());
        if ($format === null) {
            $format = $this->detectFormatByContent($this->getContent());
        }
        return $format;
    }