Sign in Join
FPDoc Onlineexperiment

TFPCustomHTTPClient.StreamFormPost procedure

Member of TFPCustomHTTPClientpublicIn unit fpHTTPClient

Performs an HTTP form POST with stream upload

Declaration

pascal
procedure StreamFormPost(const AURL: string; const AFieldName: string; 
 const AFileName: string; 
 const AStream: TStream; const Response: TStream)
procedure StreamFormPost(const AURL: string; FormData: TStrings; 
 const AFieldName: string; 
 const AFileName: string; 
 const AStream: TStream; const Response: TStream)

Arguments

AURL

The URL to post the stream form request to

AFieldName

The form field name for the stream data

AFileName

The filename to associate with the stream data

AStream

The stream containing the data to upload

Response

Variable to store the response content as string

FormData

Additional form data to include with the stream upload

Description

Performs an HTTP POST request with form data that includes a file uploaded from a stream. Uses multipart/form-data encoding for the upload.

Errors

May raise HTTP-related exceptions on connection errors or invalid responses.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.