生成会话

Session会自动保存cookie信息, 其实现是浏览器级别完备

  1. $session = Saber::session([
  2. 'base_uri' => 'http://httpbin.org',
  3. 'redirect' => 0
  4. ]);
  5. $session->get('/cookies/set?foo=bar&k=v&apple=banana');
  6. $session->get('/cookies/delete?k');
  7. echo $session->get('/cookies')->body;