From dc838a810fee14075cecb27a7d21de7600da6463 Mon Sep 17 00:00:00 2001 From: Chris Lock Date: Mon, 18 Aug 2014 16:31:07 +0100 Subject: [PATCH 1/2] Added example on how to use Cookie --- examples/cookie.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 examples/cookie.php diff --git a/examples/cookie.php b/examples/cookie.php new file mode 100644 index 000000000..743fc62a7 --- /dev/null +++ b/examples/cookie.php @@ -0,0 +1,16 @@ + $c->formatForHeader())); + +// Check what we received +var_dump($request); \ No newline at end of file From 819c5457636f69024a8aa24adab3b63668ee80b7 Mon Sep 17 00:00:00 2001 From: Chris Lock Date: Mon, 18 Aug 2014 20:33:58 +0100 Subject: [PATCH 2/2] Changed url to use /cookies --- examples/cookie.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/cookie.php b/examples/cookie.php index 743fc62a7..ba830fd23 100644 --- a/examples/cookie.php +++ b/examples/cookie.php @@ -10,7 +10,7 @@ $c = new Requests_Cookie('login_uid', 'something'); // Now let's make a request! -$request = Requests::get('http://httpbin.org/get', array('Cookie' => $c->formatForHeader())); +$request = Requests::get('http://httpbin.org/cookies', array('Cookie' => $c->formatForHeader())); // Check what we received var_dump($request); \ No newline at end of file