else { yield $this->
getEncoder()->
encodeString($this->body
);
} } public function getPreparedHeaders(): Headers
{ $headers = parent::
getPreparedHeaders();
$headers->
setHeaderBody('Parameterized', 'Content-Type',
$this->
getMediaType().'/'.
$this->
getMediaSubtype());
if ($this->charset
) { $headers->
setHeaderParameter('Content-Type', 'charset',
$this->charset
);
} if ($this->name && 'form-data' !==
$this->disposition
) { $headers->
setHeaderParameter('Content-Type', 'name',
$this->name
);
} $headers->
setHeaderBody('Text', 'Content-Transfer-Encoding',
$this->encoding
);
if (!
$headers->
has('Content-Disposition'
) && null !==
$this->disposition
) { $headers->
setHeaderBody('Parameterized', 'Content-Disposition',
$this->disposition
);
if ($this->name
) { $headers->
setHeaderParameter('Content-Disposition', 'name',
$this->name
);
} }