I'm trying to send up a request to my server with the Accept
header set. The code I'm using looks like:
A.io.request(requestUrl, {
method: 'GET',
headers: {
'Accept': acceptHeader
}
});
However, my developer tools show the header has a value of /, and on the server side when I walk through the property names using resourceRequest.getPropertyNames()
, I'm not seeing the header as being set. What am I doing wrong here?
Alternately, my underlying goal is to send a ResourceRequest to the server with the desired content type in the Accept header, and then prompt the user to save that resource. Is there a more correct way to tackle this problem?