×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    10

    Question AJAX Request is different from what is set.

    Hello Guys,

    I'm trying to run the Qype Web Application, http://projects.developer.nokia.com/PlacesS40v2
    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");
    From Fiddleractual request)
    Code:
    GET http://api.qype.com/v1/place_categories?consumer_key=YX5fmWhfawRvdJLT0Y5g HTTP/1.1
    ...
    Accept: image/*; q=0.5
    ...
    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.

  2. #2
    Super Contributor
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    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

  3. #3
    Registered User
    Join Date
    Oct 2009
    Posts
    10

    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! =)

Similar Threads

  1. Ajax xml fetching
    By web_tur in forum Symbian
    Replies: 3
    Last Post: 2010-10-21, 07:19
  2. Listening HTTP AJAX request
    By condorx in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2009-11-02, 18:37
  3. using ajax
    By james_027 in forum Symbian
    Replies: 3
    Last Post: 2009-06-26, 17:07
  4. AJAX in mobile
    By vivartpandey in forum Mobile Java General
    Replies: 1
    Last Post: 2008-05-28, 15:34

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •