title: SharePoint REST API GetFileByServerRelativeUrl not working
body: <p>I'm trying to fetch a file, which is downloable in the following URL <a href="https://notarealurl.com/sites/name/subname/My%20Folder/test.htm" rel="nofollow noreferrer">https://notarealurl.com/sites/name/subname/My%20Folder/test.htm</a> with the following method:</p>
  
  <pre><code>fetch("/_api/web/GetFileByServerRelativeUrl('/sites/name/subname/My%20Folder/test.htm')/$value");
  </code></pre>
  
  <p>However it returns 404. I've tried with and without decoding the URL. Also, using the following request, doesn't return any file, just an almost empty response. Request:</p>
  
  <pre><code>fetch("/_api/web/GetFolderByServerRelativeUrl('/sites/name/subname/My%20Folder')/files");
  </code></pre>
  
  <p>Response:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;feed xml:base="https://notarealurl.com/_api/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"&gt;&lt;id&gt;ab8997b7-04a9-4e43-a63f-486e9477e31b&lt;/id&gt;&lt;title /&gt;&lt;updated&gt;2020-04-08T12:00:40Z&lt;/updated&gt;&lt;author&gt;&lt;name /&gt;&lt;/author&gt;&lt;/feed&gt;
  </code></pre>