首页 > 代码库 > HttpSendRequest的header的构造

HttpSendRequest的header的构造

  heads:=TStringList.Create;
  heads.Add('Content-Type:application/x-www-form-urlencoded; charset=UTF-8');
  heads.Add('Cache-Control:no-cache');
  heads.Add('User-Agent:Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)');
  heads.Add('Accept:*/*');
  heads.Add('Accept-Encoding:gzip,deflate');
  heads.Add('Accept-Charset:gb2312,utf-8;q=0.7,*;q=0.7');
  heads.Add('Connection:keep-alive');
  heads.Add('Host:kyfw.12306.cn');
  heads.Add('Referer:https://kyfw.12306.cn/otn/login/init#');
  heads.Add('Accept-Language:zh-cn');

HttpSendRequest的header的构造