Unit

ScHttp

 

Description

TScHttpWebRequest is a component for the request/response model for accessing data by the HTTP protocol. Requests are sent from an application to a particular URI, such as a Web page on a server.

The TScHttpWebRequest class provides support for the properties and methods that enable the user to interact directly with servers using HTTP.

The GetResponse method makes a request to the resource specified in the RequestUri property and returns an TScHttpWebResponse that contains the response object. The response data can be received by using the TScHttpWebResponse.ReadBuffer method.

When you want to send data to the resource, use the WriteBuffer method or the RequestStream property in the chunked mode (see SendChunked).

The TScHttpWebRequest class throws a HttpException when errors occur while accessing a resource. The HttpException.StatusCode property contains a TScHttpStatusCode value that indicates the source of the error.

TScHttpWebRequest exposes common HTTP header values sent to the Internet resource as properties. You can set other headers in the Headers property as name/value pairs. Note that servers and caches may change or add headers during the request.

 

See Also

GetResponse

Headers

RequestUri

SendChunked

TScHttpWebResponse

WriteBuffer

SecureBridge Components, Copyright © 2007-2024 Devart. All Rights Reserved. Provide Feedback Visit Forum Request Support