Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/markknol/hx-jsonp
- Owner: markknol
- Created: 2015-12-16T19:40:17.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-28T09:13:22.000Z (about 9 years ago)
- Last Synced: 2024-11-25T06:52:09.533Z (2 months ago)
- Topics: cors, crossdomain, haxe, javascript, jsonp
- Language: Haxe
- Homepage:
- Size: 3.91 KB
- Stars: 4
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.