-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Negotiation returns xml instead of json #746
Comments
I removed that convention in my bootstrapper, and Robert is now my father's brother. |
@grahamrhay did you format your accept headers in your post? They don't look valid to me. Also Chrome 21.0.1180.89 m requests HTML using Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 on my machine. I do think there is an issue (i.e the StupidBrowser detection is too basic) and will probably remove it until we've improved it, but I'd like to reproduce the issue on my machine =) |
Hmm, I copied and pasted those from the debugger. I'll get you the original header tomorrow. This was from a jQuery ajax request (via Backbone). I tried setting the accepts and/or dataType options: http://api.jquery.com/jQuery.ajax/ but it didn't make any difference. |
Thank you If you get a chance then you can capture the traffic using Fiddler On Thu, Sep 13, 2012 at 8:54 PM, Graham Hay [email protected]:
|
First thing tomorrow! Thanks :) |
Accept: application/json, text/javascript, /; q=0.01 |
Hmm, there should be some stars at the end of that #formatting_fail |
Is Chrome sending that? On Fri, Sep 14, 2012 at 10:16 AM, Graham Hay [email protected]:
|
That's a bit of a philosophical question :) I have a client-side js app (backbone + jQuery) that's open in Chrome. It's making a request to the Nancy backend using jQuery.ajax(). So is Chrome making the request? Yes and no, I guess. The user agent is AppleWebKit blah, which is why my browser is "stupid". (And you can't change that for an ajax request :). |
I'm making a request to a Nancy (0.12.0) service (using jQuery.ajax), but getting xml back instead of json.
The module returns:
(see Restbucks-on-Nancy -> /menu)
When I debug, my accept headers are:
application/json, 1
text/javascript, 1
&
/; q=0.01, 1
But BuiltInAcceptHeaderCoercions thinks my browser is stupid (sad face), and replaces them with text/html. I'm using Chrome 21.0.1180.89.
Am I missing something?
The text was updated successfully, but these errors were encountered: