swoole_http_client->setCookies

设置Cookie

function swoole_http_client->setCookies(array $cookies);
  • $cookies 设置COOKIE,必须为键值对应数组
  • 设置COOKIE后在客户端对象存活期间会持续保存
  • 服务器端主动设置的COOKIE会合并到cookies数组中,可读取$client->cookies属性获得当前Http客户端的COOKIE信息