When using API endpoints that send information via the response headers, we are not able to access them even though it is recived.
Example
When using a download file API endpoint, the file name was being sent in the Content-Disposition header. When trying to access this information from JavaScript it as returning undefined.
Solution
Thus I have added an --exposedHeaders option which accepts a comma seperated list such as: [Content-Disposition,Date] OR [*] whcih then gives JavaScript client access to the headers.
When using API endpoints that send information via the response headers, we are not able to access them even though it is recived.
Example
When using a download file API endpoint, the file name was being sent in the
Content-Disposition
header. When trying to access this information from JavaScript it as returning undefined.Solution
Thus I have added an --exposedHeaders option which accepts a comma seperated list such as:
[Content-Disposition,Date]
OR[*]
whcih then gives JavaScript client access to the headers.Thank you for this project 🙏