Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/markknol/hx-jsonp

JSONP (or JSON with Padding) for Haxe
https://github.com/markknol/hx-jsonp

cors crossdomain haxe javascript jsonp

Last synced: 8 days ago
JSON representation

JSONP (or JSON with Padding) for Haxe

Awesome Lists containing this project

README

        

# JSONP for Haxe

> JSONP (or JSON with Padding) is a technique used by web developers to overcome the cross-domain restrictions imposed by browsers to allow data to be retrieved from systems other than the one the page was served by.

## Usage
```haxe
var url = js.Browser.location.protocol + '//mywebsite.com/api/jsonp/search/';
var http = new haxe.Jsonp(url);
http.onData = function(data) {
trace(data);
}
http.request("search_callback");
```
### Notes
This library only works for the Haxe JavaScript target.