tcontent.md 1.1 KB


id: tcontent title: TContent

sidebar_label: TContent

Abstract representation of HTTP request content.

This type defines the interface for various content types that can be sent in HTTP requests.

Methods

Method GetContentType:String()

Returns the MIME content type of the request body.


Method GetLength:Long()

Returns the length of the content in bytes, or -1 if unknown.


Method Read:Size_T(buffer:Byte Ptr, size:Size_T) Abstract

Reads up to 'size' bytes into the provided buffer.

Returns the number of bytes actually read, or 0 if the end of the content is reached.


Method CanReplay:Int()

Indicates whether the content can be replayed for retries.


Method Rewind:Int()

Rewinds the content to the beginning for replay.

Returns True if successful, False otherwise.


Method Clone:TContent()

Clones the content for replay purposes.

Returns a new instance of TContent that is a copy of the original, or Null if cloning is not supported.