title: XHR request with literal URL
body: <p>I'm trying to request an somewhat buggy API that is requiring some characters to be URL encoded (in my case, the dot <em>.</em> is causing the issue)</p>
  
  <p><code>GET /projects/:projectid/merge_requests</code></p>
  
  <p>With <em>project_id</em> being <code>groupname/project.name</code> that the API needs urlencoded (<strong>including the dot</strong>), otherwise it does respond with a 404</p>
  
  <p>The correct URL is <code>/projects/groupname%2Fproject%2Ename/merge_requests</code></p>
  
  <p>I'm currently doing the replacement manually but it seems the browser thinks I don't know what I'm doing an replaces <em>%2E</em> with <em>.</em> in the actual request. And so I can't query my API</p>
  
  <p>Current code looks like:</p>
  
  <pre><code>var projectid = 'foo/bar.baz';
  
  projectid = encodeURIComponent(projectid).replace(/[.]/g, '%2E');
  
  var url = 'http://gitlab.local/api/v3/projects/' + projectid + '/merge_requests'
  
  var xhr = new XMLHttpRequest();
  xhr.open("GET", url);
  xhr.responseType = 'json';
  xhr.addEventListener('load', mycallback);
  xhr.send();
  
  // -&gt; GET http://gitlab.local/api/v3/projects/foo%2Fbar.baz/merge_requests 404 ()
  </code></pre>
  
  <p>Is there any way to force the URL to be sent literally and not transformed by the browser?</p>
  
  <p>(I have the same behavior in Chrome and Firefox)</p>