public function createRequest($method, $url = null, array $options = [])
    {
        $protocol_version = '1.1';
        $body = null;
        $headers = [];

        extract($options);

        $request = new Message\Request;

        $request->setMethod($method);
        $request->setUrl($url ? (string) $this->createUrl($url) : (string) $this->baseUrl);
        $request->setProtocolVersion($protocol_version);

        if (isset($body)) {
            $body = Stream::create($body);
            $request->setBody($body);
        }

        foreach ($headers as $key => $value) {
            $request->setHeader($key, $value);
        }

        return $request;
    }