/**
  * Create a new internal request from an HTTP verb and URI.
  *
  * @param  string  $verb
  * @param  string  $uri
  * @param  string|array  $parameters
  * @return \Dingo\Api\Http\InternalRequest
  */
 protected function createRequest($verb, $uri, $parameters)
 {
     if (!isset($this->version)) {
         $this->version = $this->router->getDefaultVersion();
     }
     // Once we have a version we can go ahead and grab the API collection,
     // if one exists, from the router.
     $api = $this->router->getApiRouteCollection($this->version);
     if ($prefix = $api->option('prefix') and !starts_with($uri, $prefix)) {
         $uri = "{$prefix}/{$uri}";
     }
     $parameters = array_merge($this->parameters, (array) $parameters);
     $request = InternalRequest::create($uri, $verb, $parameters, [], $this->files);
     if ($domain = $api->option('domain')) {
         $request->headers->set('host', $domain);
     }
     $request->headers->set('accept', $this->buildAcceptHeader());
     return $request;
 }