I have a weird problem here,
When using the restler api, it seems as if the headers Content Type resets even if I forcefully set it to something different...
It seems as if
$r = new Restler();
$r->setSupportedFormats('JsonFormat');
Always resets it to "Content-Type: application/json; charset=utf-8"
So, any way I can manually override the default mime type to what I want it to be?
Other then that nothing seems wrong, here's how it looks when you request a file download: Cache-Control: no-cache, must-revalidate
Connection: Keep-Alive
Content-Disposition: attachment; filename="test.pdf"
Content-Encoding: gzip
Content-Language: en
Content-Length: 25
Content-Type: application/json; charset=utf-8
And this is what I set in the phpcode:
header("Content-type: application/pdf");
header("Content-Length: ". $data["Size"]);
header('Content-Disposition: attachment; filename="'. $data["Name"].'"');
Any help to force it as the content type I please? (jftr, pdf is an example, there are many more possible types)