Results 1 to 4 of 4

Thread: How can I get back raw JSON from external server

  1. #1
    Sencha User
    Join Date
    Mar 2012
    Location
    UK
    Posts
    28
    Answers
    1
    Vote Rating
    0
      0  

    Default How can I get back raw JSON from external server

    Because it is an external server I think that the only option I have is to use Ext.util.JSONP.request but the site that I am using doesn't seem to support a callback mechanism and just returns a pure JSON which then bombs out because it isn't wrapped.

    Is there any other way around this?

    It is so annoying that the call is successful and I can see the data coming back but it bombs out with an 'Unexpected token :' ?because it wants it wrapped.

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,026
    Answers
    3976
    Vote Rating
    1367
      0  

    Default

    The server needs to support JSONP
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Location
    UK
    Posts
    28
    Answers
    1
    Vote Rating
    0
      0  

    Default

    That is a very accurate answer but unfortunately does not help my problem or address the main question which was 'Is there any other way to do this?'

  4. #4
    Sencha User
    Join Date
    Oct 2010
    Location
    Chandigarh (INDIA)
    Posts
    143
    Vote Rating
    0
      0  

    Default

    you can enclose your json in [ JSON] so that it is in Json P format.....It may resolve your problem i have a asame issue but fixed by it.

Posting Permissions

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