如果在 post  同时   把 COOKIE的内容一同发给服务器?
网上找了好半天,特发帖求解

解决方案 »

  1.   

        aidhttp.Request.SetHeaders;
        aidhttp.Request.CustomHeaders.Text := Cookie;
      

  2.   

    Delphi7可以使用idhttp1.request.customheaders.text :='cookie:' + 获得的Cookie;
    Delphi 2010,XE可以登陆后直接POST就可以了,不用自定义COOKIE
      

  3.   

    用哪种方式POST呢,问题可能出在POST方法上面,
      

  4.   


    不明白是什么意思.
    你加入参数的话就使用Post(url,Patamstr);这样就行啊
      

  5.   


    procedure TForm1.Button1Click(Sender: TObject);
    begin  idhttp1.AllowCookies:=true;
      idhttp1.Request.SetHeaders;
      idhttp1.Request.CustomHeaders.Text:=Trim('Cookie:123;sign=123' );
      idhttp1.HandleRedirects:= true;
      idhttp1.Request.UserAgent := 'OS/1.0';//自定义客户端的签名
      idhttp1.request.ContentType:='application/x-www-form-urlencoded';//使用POST方式提交时候
      idhttp1.Request.Referer :='http://xxx.xx.xx';
      idhttp1.Request.Host:='http://xxx.xx.xx';end;
      

  6.   


    问题已经搞定,某些参数需要POST提交,某些谁彩种COOKIE方式提交,防止被窃听。