@@ -22,51 +22,51 @@ <h2>Examples</h2>
2222
2323
2424< pre contenteditable >
25- // GET, plain, no nothing
25+ // GET, plain and simple
2626$.get('https://example.com')
2727</ pre >
2828
2929
3030< pre contenteditable >
3131// GET, with a custom header, a proxied cookie, and some parameters using both url and data property
3232$.ajax({
33- method: 'GET',
34- url: 'http://localhost/php-cross-domain-proxy/test/echo.php?c=3',
35- data: {a:1, b:2},
36- headers: {
37- 'X-TestRequestHeader': 'Fluffy bunny',
38- 'X-Proxy-Cookie': 'jsessionid=AS348AF929FK219CKA9FK3B79870H;',
39- },
33+ method: 'GET',
34+ url: 'http://localhost/php-cross-domain-proxy/test/echo.php?c=3',
35+ data: {a:1, b:2},
36+ headers: {
37+ 'X-TestRequestHeader': 'Fluffy bunny',
38+ 'X-Proxy-Cookie': 'jsessionid=AS348AF929FK219CKA9FK3B79870H;',
39+ },
4040})
4141</ pre >
4242
4343
4444< pre contenteditable >
4545// POST, with both post data in property and a get parameter in the url
4646$.ajax({
47- method: 'POST',
48- url: 'http://localhost/php-cross-domain-proxy/test/echo.php?c=3',
49- data: {a:1, b:2},
47+ method: 'POST',
48+ url: 'http://localhost/php-cross-domain-proxy/test/echo.php?c=3',
49+ data: {a:1, b:2},
5050})
5151</ pre >
5252
5353
5454< pre contenteditable >
5555// PUT, with data encoded as json
5656$.ajax({
57- method: 'PUT',
58- url: 'http://localhost/php-cross-domain-proxy/test/echo.php',
59- contentType: 'application/json',
60- data: JSON.stringify({a:1, b:2}),
57+ method: 'PUT',
58+ url: 'http://localhost/php-cross-domain-proxy/test/echo.php',
59+ contentType: 'application/json',
60+ data: JSON.stringify({a:1, b:2}),
6161})
6262</ pre >
6363
6464
6565< pre contenteditable >
6666// DELETE, with get parameter
6767$.ajax({
68- method: 'DELETE',
69- url: 'http://localhost/php-cross-domain-proxy/test/echo.php?id=1',
68+ method: 'DELETE',
69+ url: 'http://localhost/php-cross-domain-proxy/test/echo.php?id=1',
7070})
7171</ pre >
7272
0 commit comments