I have a method to return file from web api
public static HttpResponseMessage FileAsFileAttachment(byte[] bytes, string filename)
{
var result = new HttpResponseMessage(HttpStatusCode.OK) { Content = new ByteArrayContent(bytes) };
result.Content.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
result.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment") { FileName = filename};
return result;
}
How can i read Content-Disposition header from responce?
this.httpClient.fetch(`/company/get-asic-fee-autocomplete`).then(data=> { console.log(data.headers.get("Content-Disposition "))});
this header always null
How get filename and show all headers in aurelia fetch-client???