Skip to content

Enabling callback function encapsulation for JSON #39

@gallien-lbr

Description

@gallien-lbr

I'm having a problem using the API with jQuery, because It is not possible to do cross-domain AJAX using the conventional XMLHTTPRequest. Would It be possible to encapsulate the returned JSON into a function call ?
So we could use an url such as :

http://api.mp2013.fr/near?from=2013-01-01&to=2013-01-15&lang=fr&offset=&limit=1&format=json&latitude=43.307192&longitude=5.372314&callback=foo

that returns:

foo(
{
//json
})

here is an article relative to this issue : http://fcargoet.evolix.net/2009/02/jsonp-avec-jquery/ (in french)

Best regards,
Gallien

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions