AJAX Request is different from what is set.
Hello Guys,
I'm trying to run the Qype Web Application, [url]http://projects.developer.nokia.com/PlacesS40v2[/url]
The problem I'm encounter when the app sends an AJAX request, XML is returned. PlacesS40v2 expects JSON format to be returned.
From QypeApi.js line 42:
[CODE]xhr.setRequestHeader("Accept", "application/json");[/CODE]
From Fiddler:(actual request)
[CODE]GET http://api.qype.com/v1/place_categories?consumer_key=YX5fmWhfawRvdJLT0Y5g HTTP/1.1
...
Accept: image/*; q=0.5
...[/CODE]
It seems that the Simulator is overriding the Accept Header to image/*; q=0.5. Is there a work around on this?
Please Help me.
Re: AJAX Request is different from what is set.
Hi,
Thanks for reporting this bug related to local preview! Cloud preview and device are not affected.
I'll file a bug report ASAP. I'm very optimistic that this will be fixed.
As you are already familiar with Fiddler, you could check if Auto Responder would be good enough for debugging purposes.
You could use Desktop Browser to get JSON responses for some use cases and store responses to your PC.
Then set Auto responder to response using those files when certain URL is accessed.
Br,
Ilkka
Re: AJAX Request is different from what is set.
Ahh I see, I'll do just that for the mean time. Thank you very much! =)