[Delphi] Embeddedwb에서 Post로 보내기, User-Agent 보내기


쓸데없이 삽질했음..


var

  i: Integer;

  strData: string;

  Empty: OleVariant;

  Header: OleVariant;

  Post: OleVariant;

begin


  strData := 'id=' + UserID + '&' + 'passwd=' + UserPW; // post 보낼 값


  Post := VarArrayCreate([0, Length(strData) - 1], varByte);

  for i := 1 to Length(strData) do

    Post[i - 1] := Ord(strData[i]);


  Header := 'Content-type: application/x-www-form-urlencoded' + #10#13 +

    'User-Agent: 여기넣기' + #10#13;


  Embeddedwb.Navigate('보낼주소', Empty, Empty, Post, Header);


end;