Amp\Artax\FormBody::addFields PHP Method

addFields() public method

Add each element of a associative array as a data field to the form entity body
public addFields ( array $data, string $contentType = 'text/plain' ) : self
$data array
$contentType string
return self
    public function addFields(array $data, $contentType = 'text/plain')
    {
        foreach ($data as $key => $value) {
            $this->addField($key, $value, $contentType);
        }
        return $this;
    }