-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set Accept
header for XHR requests
#540
Comments
This issue has been inactive for 30 days. It will be in closed in 5 days without any new activity. |
@brycekahle can you please take a look at this? |
This issue has been inactive for 30 days. It will be in closed in 5 days without any new activity. |
bump |
This issue has been inactive for 30 days. It will be in closed in 5 days without any new activity. |
bump |
This issue has been inactive for 30 days. It will be in closed in 5 days without any new activity. |
bump |
This issue has been inactive for 30 days. It will be in closed in 5 days without any new activity. |
bump |
This issue has been inactive for 30 days. It will be in closed in 5 days without any new activity. |
bump |
This issue has been inactive for 30 days. It will be in closed in 5 days without any new activity. |
bump |
When making XHR requests, can you please set the
Accept
header? It's currently not set, meaning it defaults to*
Server side frameworks use the
Accept
header to determine how a request should be handled. For example, Spring Security will return HTTP 401 instead of redirecting to a login page is authentication is required.I believe that these should be the values for the requests:
/info
should haveAccept: application/json
/xhr
should haveAccept: application/json
/xhr_send
should haveAccept: text/plain
/xhr_streaming
should haveAccept: application/javascript
/eventsource
should haveAccept: text/event-stream
In some cases, it's not possible to do set the
Accept
header (such as when usingXDomainRequest
, iframes, or jsonp). But it should be set appropriately whenever it is possible.The text was updated successfully, but these errors were encountered: