Skip to content

Commit 47d7cb0

Browse files
committed
Moved cookie example from readme to test page
1 parent 43b06b2 commit 47d7cb0

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

README.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,6 @@ $.ajax({
7777
})
7878
```
7979

80-
**Basic GET request with cookie**
81-
82-
``` JAVASCRIPT
83-
$.ajax({
84-
url: 'proxy.php',
85-
cache: false,
86-
headers: {
87-
'X-Proxy-URL': 'http://example.com/api/method',
88-
'X-Proxy-Cookie': 'jsessionid=AS348AF929FK219CKA9FK3B79870H;',
89-
},
90-
})
91-
```
92-
9380
**Automagic via global [`ajaxSend`](http://api.jquery.com/ajaxSend/) event**
9481

9582

test/index.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,17 @@ <h1>PHP Cross Domain Proxy test page</h1>
3636

3737
<h2>Examples</h2>
3838
<pre class="prettyprint" style="border:0;padding:0">
39-
// GET, no parameters
40-
$.ajax({
41-
url: 'http://example.com',
42-
})
39+
// GET, plain, no nothing
40+
$.get('http://example.com')
4341

44-
// GET, with custom header and some parameters using both url and data property
42+
// GET, with a custom header, a proxied cookie, and some parameters using both url and data property
4543
$.ajax({
4644
method: 'GET',
4745
url: 'http://localhost/php-cross-domain-proxy/test/echo.php?c=3',
4846
data: {a:1, b:2},
4947
headers: {
5048
'X-TestRequestHeader': 'Fluffy bunny',
49+
'X-Proxy-Cookie': 'jsessionid=AS348AF929FK219CKA9FK3B79870H;',
5150
},
5251
})
5352

0 commit comments

Comments
 (0)