public function constructOptions(TelegramMethods $method): array
    {
        $result = $this->checkIsMultipart($method);

        if (!empty($result)) {
            return $this->constructMultipartOptions(
                $method->export(),
                $result
            );
        }

        $body = http_build_query($method->export(), '', '&');
        
        return [
            'headers' => [
                'Content-Type' => 'application/x-www-form-urlencoded',
                'Content-Length' => \strlen($body),
                'User-Agent' => 'PHP7+ Bot API',
            ],
            'body' => $body
        ];
    }
public function constructOptions(TelegramMethods $method): array
    {
        $result = $this->checkIsMultipart($method);

        if (!empty($result)) {
            return $this->constructMultipartOptions(
                $method->export(),
                $result
            );
        }

        $body = http_build_query($method->export(), '', '&');
        
        return [
            'headers' => [
                'Content-Type' => 'application/x-www-form-urlencoded',
                'Content-Length' => \strlen($body),
                'User-Agent' => 'PHP7+ Bot API',
            ],
            'body' => $body
        ];
    }
public function constructOptions ( TelegramMethods $ method ) : array { $ result = $ this -> checkIsMultipart ( $ method ) ; if ( ! empty ( $ result ) ) { return $ this -> constructMultipartOptions ( $ method -> export ( ) , $ result ) ; } $ body = http_build_query ( $ method -> export ( ) , '' , '&' ) ; return [ 'headers' => [ 'Content-Type' => 'application/x-www-form-urlencoded' , 'Content-Length' => \ strlen ( $ body ) , 'User-Agent' => 'PHP7+ Bot API' , ] , 'body' => $ body ] ; }
Builds up the form elements to be sent to Telegram

@TODO Move this to apart function

@param TelegramMethods $method
@return array
@throws \unreal4u\TelegramAPI\Exceptions\MissingMandatoryField
Builds up the form elements to be sent to Telegram