# Unit httpsend

Description | uses | Classes, Interfaces and Objects | Functions and Procedures | Types | Constants | Variables

## Description

HTTP protocol client

Used RFC: RFC-1867, RFC-1947, RFC-2388, RFC-2616

## Classes, Interfaces and Objects

Name | Description
--- | ---
Class `THTTPSend` |

## Functions and Procedures

### Overview

`function HttpGetText(const URL: string; const Response: TStrings): Boolean;`
`function HttpGetBinary(const URL: string; const Response: TStream): Boolean;`
`function HttpPostBinary(const URL: string; const Data: TStream): Boolean;`
`function HttpPostURL(const URL, URLData: string; const Data: TStream): Boolean;`
`function HttpPostFile(const URL, FieldName, FileName: string; const Data: TStream; const ResultData: TStrings): Boolean;`

### Description

`function HttpGetBinary(const URL: string; const Response: TStream): Boolean;`

A very usefull function, and example of use can be found in the THTTPSend object. It implements the GET method of the HTTP protocol. This function sends the GET method for URL document to an HTTP server. Returned document is in the "Response" stream. Returns boolean TRUE if all went well.

`function HttpGetText(const URL: string; const Response: TStrings): Boolean;`

A very usefull function, and example of use can be found in the THTTPSend object. It implements the GET method of the HTTP protocol. This function sends the GET method for URL document to an HTTP server. Returned document is in the "Response" stringlist (without any headers). Returns boolean TRUE if all went well.

`function HttpPostBinary(const URL: string; const Data: TStream): Boolean;`

A very useful function, and example of use can be found in the THTTPSend object. It implements the POST method of the HTTP protocol. This function sends the SEND method for a URL document to an HTTP server. The document to be sent is located in "Data" stream. The returned document is in the "Data" stream. Returns boolean TRUE if all went well.

`function HttpPostFile(const URL, FieldName, FileName: string; const Data: TStream; const ResultData: TStrings): Boolean;`

A very useful function, and example of use can be found in the THTTPSend object. It implements the POST method of the HTTP protocol. This function sends the POST method for a URL document to an HTTP server. This function simulate posting of file by HTML form used method 'multipart/form-data'. Posting file is in DATA stream. Its name is Filename string. Fieldname is for name of formular field with file. (simulate HTML INPUT FILE) The returned document is in the ResultData Stringlist. Returns boolean TRUE if all went well.

`function HttpPostURL(const URL, URLData: string; const Data: TStream): Boolean;`

A very useful function, and example of use can be found in the THTTPSend object. It implements the POST method of the HTTP protocol. This function is good for POSTing form data. It sends the POST method for a URL document to an HTTP server. You must prepare the form data in the same manner as you would the URL data, and pass this prepared data to "URLdata". The following is a sample of how the data would appear: 'name=Lukas&field1=some%20data'. The information in the field must be encoded by EncodeURLElement function. The returned document is in the "Data" stream. Returns boolean TRUE if all went well.

## Types

Name | Description
--- | ---
TTransferEncoding`` | These encoding types are used internally by the THTTPSend object to identify the transfer data types. TE_UNKNOWN: TE_IDENTITY: TE_CHUNKED:

## Constants

Name | Description
--- | ---
cHttpProtocol`= '80';` |

Generated by PasDoc 0.8.8.2 on 2005-01-19 20:01:18