public function setBodyData($data)
    {
        if (!$data instanceof \Generator) {
            $this->body[static::DEFAULT_DATA_NAME] = $data;
            return $this;
        }
        foreach ($data as $key => $value) {
            $actualKey = $key ?: static::DEFAULT_DATA_NAME;
            $this->body[$actualKey] = $value;
        }
        return $this;
    }