Indy 9 | Content | Index | Reference

TIdMultiPartFormDataStream
Hierarchy, Properties, Methods, See Also, Unit: IdMultipartFormData
Implements support for MIME-like multipart form responses.

    TIdMultiPartFormDataStream = class(TStream)

Unit
IdMultipartFormData
Description
TIdMultiPartFormDataStream is a TStream descendant that implements support for encapsulation of MIME-like "multipart" types in the content of an HTTP message body, as described in the Internet Standards document:

- RFC 1867 - Form-based File Upload in HTML (http://www.rfc-editor.org/rfc/rfc1867.txt)

TIdMultiPartFormDataStream is oriented towards handling HTTP messages specifically defined to carry HTML FORM data suitable for processing via the POST request method. TIdMultiPartFormDataStream includes support for uniformly representing both field and file upload requests, and a MIME compatible representation for field and file upload responses.

Multipart form content for the stream can include values for the HTML INPUT types:

- CHECKBOX

- HIDDEN

- IMAGE

- PASSWORD

- RADIO

- RESET

- SUBMIT

- TEXT

- FILE

TIdMultiPartFormDataStream utilizes the MIME media type "multipart/form-data" to specify the content-type for values in the HTTP message sent from a client to a server. Note: The content-type "multipart/mixed" may be used when multiple files are included the multipart response.

TIdMultiPartFormDataStream is used in the overloaded TIdHTTP.Post method when sending a "multipart/form-data" request to an HTTP server.

TIdMultiPartFormDataStream.Boundary
TIdMultiPartFormDataStream

    property Boundary: string;

Description
Boundary

TIdMultiPartFormDataStream.RequestContentType
TIdMultiPartFormDataStream

    property RequestContentType: string;

Description
RequestContentType

TIdMultiPartFormDataStream.AddFile
TIdMultiPartFormDataStream

    procedure AddFile(const AFieldName: string; const AFileName: string; const AContentType: string);

Description
AddFile

TIdMultiPartFormDataStream.AddFormField
TIdMultiPartFormDataStream

    procedure AddFormField(const AFieldName: string; const AFieldValue: string);

Description
AddFormField

TIdMultiPartFormDataStream.AddObject
TIdMultiPartFormDataStream

    procedure AddObject(const AFieldName: string; const AContentType: string; AFileData: TObject; const AFileName: string = '');

Description
AddObject

TIdMultiPartFormDataStream.Create
TIdMultiPartFormDataStream

    constructor Create;

Description
Create

TIdMultiPartFormDataStream.Destroy
TIdMultiPartFormDataStream

    destructor Destroy; override;

Description
Destroy

TIdMultiPartFormDataStream.Read
TIdMultiPartFormDataStream

    function Read(var Buffer; Count: Longint): Longint; override;

Description
Read

TIdMultiPartFormDataStream.Seek
TIdMultiPartFormDataStream

    function Seek(Offset: Longint; Origin: Word): Longint; override; overload;

Description
Seek

TIdMultiPartFormDataStream.Write
TIdMultiPartFormDataStream

    function Write(const Buffer; Count: Longint): Longint; override;

Description
Write

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.