@@ -22,51 +22,51 @@ <h2>Examples</h2>
22
22
23
23
24
24
< pre contenteditable >
25
- // GET, plain, no nothing
25
+ // GET, plain and simple
26
26
$.get('https://example.com')
27
27
</ pre >
28
28
29
29
30
30
< pre contenteditable >
31
31
// GET, with a custom header, a proxied cookie, and some parameters using both url and data property
32
32
$.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
+ },
40
40
})
41
41
</ pre >
42
42
43
43
44
44
< pre contenteditable >
45
45
// POST, with both post data in property and a get parameter in the url
46
46
$.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},
50
50
})
51
51
</ pre >
52
52
53
53
54
54
< pre contenteditable >
55
55
// PUT, with data encoded as json
56
56
$.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}),
61
61
})
62
62
</ pre >
63
63
64
64
65
65
< pre contenteditable >
66
66
// DELETE, with get parameter
67
67
$.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',
70
70
})
71
71
</ pre >
72
72
0 commit comments