title: Get raw file from repository
body: <p>I want to get a file content in gitlab by using its api.
  Firstly, I check my gitlab version, its written as,
  GitLab Community Edition 9.4.3 b125d21 update asap</p>
  
  <p>Then I create a private token and 
  <a href="http://gitadress/api/v4/projects/id/repository/files?private_token=PRIVATE_TOKEN" rel="noreferrer">http://gitadress/api/v4/projects/id/repository/files?private_token=PRIVATE_TOKEN</a>
  returns as;</p>
  
  <pre><code>{"error":"404 Not Found"}
  </code></pre>
  
  <p>then I modify the query as;</p>
  
  <p><a href="http://gitadress/api/v4/projects/222/repository/tree?private_token=PRIVATE_TOKEN" rel="noreferrer">http://gitadress/api/v4/projects/222/repository/tree?private_token=PRIVATE_TOKEN</a> 
  this request returns as;</p>
  
  <pre><code>[{"id":"8078365d80c","name":"test.js","type":"blob","path":"test.js","mode":"100644"}]
  </code></pre>
  
  <p>What I want is to get the content of the test.js but whatever I tried I couldn't achieve it.</p>
  
  <p><a href="http://gitadress/api/v4/projects/id/repository/tree/test.js/raw?private_token=PRIVATE_TOKEN&amp;ref=master" rel="noreferrer">http://gitadress/api/v4/projects/id/repository/tree/test.js/raw?private_token=PRIVATE_TOKEN&amp;ref=master</a>
  returns as; </p>
  
  <pre><code>{"error":"404 Not Found"}
  </code></pre>
  
  <p>How can I get the raw file content by using gitlab api?
  Documentation is here;
  <a href="https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/repository_files.md#get-raw-file-from-repository" rel="noreferrer">https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/repository_files.md#get-raw-file-from-repository</a></p>