{"id":22092200,"url":"https://github.com/pirxpilot/jsonp","last_synced_at":"2025-04-09T21:53:12.377Z","repository":{"id":5967108,"uuid":"7188632","full_name":"pirxpilot/jsonp","owner":"pirxpilot","description":"Tiny subset of superagent-like API to be used with jsonp requests","archived":false,"fork":false,"pushed_at":"2017-03-12T01:15:57.000Z","size":15,"stargazers_count":5,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T21:53:07.165Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pirxpilot.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","contributing":null,"funding":null,"license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-16T08:06:00.000Z","updated_at":"2019-11-20T08:35:53.000Z","dependencies_parsed_at":"2022-09-17T15:02:11.671Z","dependency_job_id":null,"html_url":"https://github.com/pirxpilot/jsonp","commit_stats":null,"previous_names":["code42day/jsonp"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fjsonp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fjsonp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fjsonp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fjsonp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pirxpilot","download_url":"https://codeload.github.com/pirxpilot/jsonp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119400,"owners_count":21050754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-01T03:08:45.452Z","updated_at":"2025-04-09T21:53:12.355Z","avatar_url":"https://github.com/pirxpilot.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# jsonp\n\nTiny subset of [superagent][]-like API to be used with [jsonp][] requests\n\n## Installation\n\n    $ npm install tiny-jsonp\n\n## API\n\nTo construct and send request:\n\n```javascript\njsonp('http://example.com')\n    .query({\n        param1: 'value',\n        param2: 3\n    }).end(function(data) {\n        console.log('This is your json:', data);\n    });\n```\n\nPlease note - you don't add ```callback``` parameter: JSONP takes care of that.\n\nYou can call query as many times as needed. New parameters will overwrite the old values.\n\nIf URL is already constructed you can also shortened form:\n\n```javascript\njsonp('http://example.com?param1=value\u0026param2=3', function(data) {\n    console.log('This is your json:', data);\n});\n```\n\n\n## Caveat\n\nChances are API that you are using already supports [CORS][] - in that case just use superagent.\nJSONP is a hackish solution.\n\nMany libraries pretend that JSONP is like any other request: jQuery magically decides between\nsending XRC and JSONP based on the presence of ```callback``` parameter. But JSONP does not support\nmuch of the functionality of the standard HTTP request. We just add ```script``` tag tricking\nbrowser into sending HTTP GET. No other HTTP methods are supported, errors handling is limited,\nand you have no control over HTTP headers sent with request.\n\n## License\n\n  MIT\n\n[jsonp]: http://en.wikipedia.org/wiki/JSONP \"JSON with padding\"\n[superagent]: https://github.com/visionmedia/superagent \"Ajax with less suck\"\n[CORS]: http://en.wikipedia.org/wiki/Cross-origin_resource_sharing \"Cross-origin resource sharing\"","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpirxpilot%2Fjsonp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpirxpilot%2Fjsonp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpirxpilot%2Fjsonp/lists"}