Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simonbengtsson/ajaxbridge
See it in action
https://github.com/simonbengtsson/ajaxbridge
Last synced: about 1 month ago
JSON representation
See it in action
- Host: GitHub
- URL: https://github.com/simonbengtsson/ajaxbridge
- Owner: simonbengtsson
- Created: 2014-10-09T12:41:08.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-10-01T20:49:30.000Z (about 7 years ago)
- Last Synced: 2024-04-14T07:33:11.289Z (7 months ago)
- Language: PHP
- Homepage: http://ajax-bridge.appspot.com
- Size: 8.79 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Ajax Bridge
The purpose of AjaxBridge is to act as a proxy to circumvent the cross origin policy. It enables any javascript
to send any request to any server and get the complete response back, including cookie headers.### Usage
This example fetches the html of the twitter homepage. The only required option is url`.var options = {
url: 'https://twitter.com/',
method: 'GET',
headers: {
'User-Agent': 'AjaxBridge',
'Other-Header': 'Value'
},
content: ''
};$.post('https://ajax-bridge.appspot.com', options, function (res) {
console.log(res); // See example response below
});{
"protocol": "HTTP/1.1",
"status": 200,
"statusText": "OK",
"headers": {
"cache-control": "no-cache, no-store, must-revalidate, pre-check=0, post-check=0",
"content-security-policy-report-only": "default-src https:; connect-src https:; font-src https",
"content-type": "text/html;charset=utf-8",
"date": "Fri, 17 Oct 2014 18:16:10 UTC",
"expires": "Tue, 31 Mar 1981 05:00:00 GMT",
"last-modified": "Fri, 17 Oct 2014 18:16:10 GMT",
"ms": "S",
"pragma": "no-cache",
"server": "tsa_a",
"set-cookie": "guest_id=v1%3A141356977060427045; Domain=.twitter.com; Path=/; Expires=Sun, 16-Oct-2016 18:16:10 UTC",
"status": "200 OK",
"strict-transport-security": "max-age=631138519",
"x-connection-hash": "e43d6d1abaacfa287738a7a17f329665",
"x-content-type-options": "nosniff",
"x-frame-options": "SAMEORIGIN",
"x-transaction": "a1413ba660e67325",
"x-ua-compatible": "IE=edge,chrome=1",
"x-xss-protection": "1; mode=block",
"X-Google-Cache-Control": "remote-fetch",
"Via": "HTTP/1.1 GWA"
},
"content": "\n