/** * {@inheritdoc} */ public function send($method, $uri, array $headers = [], $data = [], array $files = [], array $options = []) { if ($data instanceof StreamInterface && !empty($files)) { throw new \InvalidArgumentException('A data instance of Psr\\Http\\Message\\StreamInterface and $files parameters should not be passed together.'); } $request = $this->messageFactory->createInternalRequest($method, $uri, isset($options['protocolVersion']) ? $options['protocolVersion'] : '1.1', $headers, $data, $files); return $this->sendRequest($request); }