Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
fpc-src / usr / share / fpcsrc / 3.0.0 / packages / fcl-web / examples / httpclient / httppostfile.pp
Size: Mime:
program httppostfile;

{$mode objfpc}{$H+}

uses
  SysUtils, Classes, fphttpclient;

Var
  F : TFileStream;
  Vars : TStrings;
  i : integer;
begin
  With TFPHTTPClient.Create(Nil) do
    begin
    F:=TFileStream.Create('response.html',fmCreate);
    try
      Vars:=TstringList.Create;
      try
        FileFormPost(ParamStr(1),'myfile',paramstr(2),f);
      finally
        Vars.Free;
      end;
    finally
      F.Free;
    end;
    end;
end.