Class TBrookHttpClient

Unit

Declaration

type TBrookHttpClient = class(TBrookObject)

Description

Client to perform HTTP requests.

Hierarchy

Overview

Methods

Public constructor Create(const ALibrary: string);
Public class procedure SetLibrary(const ALibrary: string);
Public class procedure Prepare(out AHttp: TBrookHttpDef);
Public class function Get(const AUrl: string; AResponse: TStream): Boolean;
Public class function Post(const AUrl: string; AResponse: TStream): Boolean;
Public class function Put(const AUrl: string; AResponse: TStream): Boolean;
Public class function Delete(const AUrl: string; AResponse: TStream): Boolean;
Public class function Options(const AUrl: string; AResponse: TStream): Boolean;
Public class function Head(const AUrl: string; AHeaders: TStrings): Boolean;
Public class function PostForm(const AUrl: string; AFormData, AResponse: TStream): Boolean;
Public class function PostForm(const AUrl, AFormData: string; AResponse: TStream): Boolean;
Public class function PutForm(const AUrl: string; AFormData, AResponse: TStream): Boolean;
Public class function PutForm(const AUrl, AFormData: string; AResponse: TStream): Boolean;
Public class function PostFile(const AUrl, AFieldName, AFileName: string; AFile, AResponse: TStream): Boolean;
Public class function PostFile(const AUrl, AFieldName, AFileName: string; AResponse: TStream): Boolean;
Public function Request(AHttp: TBrookHttpDef): TBrookHttpResult;
Public function Request(const AMethod, AUrl: string): TBrookHttpResult;
Public function Request(const AUrl: string): TBrookHttpResult;

Description

Methods

Public constructor Create(const ALibrary: string);

Creates an instance of a TBrookHttpClient class.

Public class procedure SetLibrary(const ALibrary: string);

Specifies the library to be used by this class.

Public class procedure Prepare(out AHttp: TBrookHttpDef);

Prepares an instance of TBrookHttpDef.

Public class function Get(const AUrl: string; AResponse: TStream): Boolean;

Sends request by a GET HTTP request method.

Public class function Post(const AUrl: string; AResponse: TStream): Boolean;

Sends request by a POST HTTP request method.

Public class function Put(const AUrl: string; AResponse: TStream): Boolean;

Sends request by a PUT HTTP request method.

Public class function Delete(const AUrl: string; AResponse: TStream): Boolean;

Sends request by a DELETE HTTP request method.

Public class function Options(const AUrl: string; AResponse: TStream): Boolean;

Sends request by an OPTIONS HTTP request method.

Public class function Head(const AUrl: string; AHeaders: TStrings): Boolean;

Sends request by a HEAD HTTP request method.

Public class function PostForm(const AUrl: string; AFormData, AResponse: TStream): Boolean;

Sends request by a POST HTTP request method, passing a form-data as parameter.

Public class function PostForm(const AUrl, AFormData: string; AResponse: TStream): Boolean;

Sends request by a POST HTTP request method, passing a form-data as parameter.

Public class function PutForm(const AUrl: string; AFormData, AResponse: TStream): Boolean;

Sends request by a PUT HTTP request method, passing a form-data as parameter.

Public class function PutForm(const AUrl, AFormData: string; AResponse: TStream): Boolean;

Sends request by a PUT HTTP request method, passing a form-data as parameter.

Public class function PostFile(const AUrl, AFieldName, AFileName: string; AFile, AResponse: TStream): Boolean;

Sends request by a POST HTTP request method, passing a file as parameter.

Public class function PostFile(const AUrl, AFieldName, AFileName: string; AResponse: TStream): Boolean;

Sends request by a POST HTTP request method, passing a file as parameter.

Public function Request(AHttp: TBrookHttpDef): TBrookHttpResult;

Performs the request, passing a TBrookHttpDef as parameter.

Public function Request(const AMethod, AUrl: string): TBrookHttpResult;

Performs the request, passing the method and URL as parameter.

Public function Request(const AUrl: string): TBrookHttpResult;

Performs the request, passing URL as parameter.


Generated by PasDoc 0.15.0.