I made the following request to download a file from Sharepoint 2013 using REST api:
GET https://mydomain.sharepoint.com/mysite/_api/web/GetFolderByServerRelativeUrl('/mysite/testlib')/files('test-file.pdf')/$value Accept-Encoding: gzip Accept: application/octet-stream Authorization: Bearer eyJ0eXAiOiJKV1QiLCJ... User-Agent: Google-HTTP-Java-Client/1.13.1-beta (gzip)
I got the response with correct file's content, but the Content-Type of the response is:
Is that anyway I can make Sharepoint returns full Mime-Type in the response header? i.e. Content-Type: application/pdf
Thanks in advance!