RSS订阅 | 匿名投稿
您的位置:网站首页 > 正则 > 正文

delphi IDHTTP Post request

作者:admin 来源: 日期:2018/1/27 22:50:28 人气: 标签:

uses IdMultipartFormData;

{ .... }

procedure TForm1.Button1Click(Sender: TObject);
var
  data: TIdMultiPartFormDataStream;
begin
  data := TIdMultiPartFormDataStream.Create;
  try
    { add the used parameters for the script }
    data.AddFormField('param1', 'value1');
    data.AddFormField('param2', 'value2');
    data.AddFormField('param3', 'value3');

    { Call the Post method of TIdHTTP and read the result into TMemo }
    Memo1.Lines.Text := IdHTTP1.Post('http://localhost/script.php', data);
  finally
    data.Free;
  end;
end;

读完这篇文章后,您心情如何?
0
0
0
0
0
0
0
0
本文网址:
下一篇:没有资料