BlitzMax

BlitzMax

  • Downloads
  • Docs
  • API
  • Resources
  • About

›Http

BlitzMax API

  • Introduction

BRL

    Audio

    • Introduction
    • TChannel
    • TSound

    AudioSample

    • Introduction
    • TAudioSample
    • TAudioSampleLoader

    Bank

    • Introduction
    • TBank

    BankStream

    • Introduction
    • TBankStream

    Base64

    • Introduction
    • TBase64

    Blitz

    • Introduction
    • TArrayBoundsException
    • TBlitzException
    • TIllegalArgumentException
    • TInvalidEnumException
    • TNullFunctionException
    • TNullMethodException
    • TNullObjectException
    • TOutOfDataException
    • TRuntimeException
    • IIterable
    • IIterator
    • ICloseable

    Clipboard

    • Introduction
    • TClipboard
    • TClipboardOpts
    • TWin32ClipboardOpts
    • TX11ClipboardOpts

    Color

    • Introduction
    • SColor8
  • BRL.D3D7Max2D
  • BRL.D3D9Max2D
  • BRL.DirectSoundAudio
  • BRL.EndianStream
  • Event

    • Introduction
    • TEvent
  • BRL.EventQueue
  • FileSystem

    • Introduction
    • IFileWalker
    • SFileAttributes
  • BRL.FreeAudioAudio
  • BRL.GLGraphics
  • BRL.GLMax2D
  • Glob

    • Introduction
    • EGlobOptions
    • TGlobIter
  • BRL.GNet
  • BRL.Graphics
  • BRL.Hook
  • IO

    • Introduction
    • MaxIO
  • BRL.KeyCodes
  • LinkedList

    • Introduction
    • TList
    • TListEnum
    • TLink

    Map

    • Introduction
    • TMap
  • BRL.Math
  • Max2D

    • Introduction
    • TImage

    MaxLua

    • Introduction
    • TLuaClass
    • TLuaObject

    MaxUnit

    • Introduction
    • TTest
    • TAssert
  • BRL.OGGLoader
  • BRL.OpenALAudio
  • Path

    • Introduction
    • TPath
    • IPathWalker
    • SPathAttributes
    • TPathDirIterator

    Pixmap

    • Introduction
    • TPixmap
    • TPixmapLoader
  • BRL.PolledInput
  • BRL.RamStream
  • Random

    • Introduction
    • TRandomDefault

    RectPacker

    • Introduction
    • EPackingMethod
    • SPackedRect
    • TPackedSheet
    • TRectPacker

    Reflection

    • Introduction
    • TTypeId
    • TMember
    • TConstant
    • TField
    • TGlobal
    • TFunction
    • TMethod
  • BRL.Retro
  • BRL.Socket
  • BRL.SocketStream
  • BRL.StandardIO
  • Stream

    • Introduction
    • TCStream
    • TIO
    • TStream
    • TStreamException
    • TStreamFactory
    • TStreamReadException
    • TStreamWrapper
    • TStreamWriteException

    StringBuilder

    • Introduction
    • TStringBuilder
    • TSplitBuffer
  • BRL.System
  • BRL.SystemDefault
  • BRL.TextStream
  • ThreadPool

    • Introduction
    • TRunnable
    • TThreadPoolExecutor

    Threads

    • Introduction
    • TThread
    • TThreadData
    • TMutex
    • TSemaphore
    • TCondVar

    Time

    • Introduction
    • ETimeUnit
    • TTimeoutException

    Timer

    • Introduction
    • TChrono
  • BRL.TimerDefault
  • Volumes

    • Introduction
    • TVolume
  • BRL.WAVLoader

Pub

  • Pub.FreeJoy
  • Pub.FreeProcess
  • Pub.Glad
  • Pub.Glew
  • Joystick

    • Introduction
    • TJoystickDriver
  • Pub.Lua
  • Pub.OpenAL
  • Pub.OpenGLES
  • StdC

    • Introduction
    • SDateTime
  • Pub.xmmintrin

Collections

    IntMap

    • Introduction
    • TIntMap

    ObjectList

    • Introduction
    • TObjectList
    • TObjectListEnumerator
    • TObjectListReverseEnumerator

    ObjectMap

    • Introduction
    • TObjectMap

    PtrMap

    • Introduction
    • TPtrMap

    StringMap

    • Introduction
    • TStringMap

Crypto

    Digest

    • Introduction
    • TMessageDigest
    • TDigestRegister

    Cipher

    • Introduction
    • TCipher
    • TCipherMode
    • Crypto.AESCipher
    • Crypto.AnubisCipher
    • Crypto.BlowfishCipher
    • Crypto.CamelliaCipher
    • Crypto.Cast5Cipher
    • Crypto.DESCipher
    • Crypto.IdeaCipher
    • Crypto.KasumiCipher
    • Crypto.KhazadCipher
    • Crypto.KSeedCipher
    • Crypto.NoekeonCipher
    • Crypto.SerpentCipher
    • Crypto.SkipjackCipher
    • Crypto.TwofishCipher
    • Crypto.XTeaCipher

    CBCMode

    • Introduction
    • TCBCCipherMode

    CFBMode

    • Introduction
    • TCFBCipherMode

    CTRMode

    • Introduction
    • TCTRCipherMode

    ECBMode

    • Introduction
    • TECBCipherMode

    F8Mode

    • Introduction
    • TF8CipherMode

    LRWMode

    • Introduction
    • TLRWCipherMode

    OFBMode

    • Introduction
    • TOFBCipherMode

    XTSMode

    • Introduction
    • TXTSCipherMode

    Blake2BDigest

    • Introduction
    • TBlake2B_512
    • TBlake2B_384
    • TBlake2B_256
    • TBlake2B_160

    CRC32

    • Introduction
    • TCRC32

    MD5Digest

    • Introduction
    • TMD5

    Ripemd320Digest

    • Introduction
    • TRipemd320

    Ripemd356Digest

    • Introduction
    • TRipemd256

    Ripemd160Digest

    • Introduction
    • TRipemd160

    Ripemd128Digest

    • Introduction
    • TRipemd128

    SHA1Digest

    • Introduction
    • TSHA1

    SHA256Digest

    • Introduction
    • TSHA256

    SHA512Digest

    • Introduction
    • TSHA512

    SHA3Digest

    • Introduction
    • TSHA3_512
    • TSHA3_384
    • TSHA3_256
    • TSHA3_224

    TigerDigest

    • Introduction
    • TTiger

    WhirlpoolDigest

    • Introduction
    • TWhirlpool

    Crypto

    • Introduction
    • TCryptoRandom
    • TCryptoSecretBox
    • TCryptoHash
    • TCryptoSign
    • TCryptoKeyExchange
    • TCryptoKey
    • TCryptoHashKey
    • TCryptoSecretBoxKey
    • TCryptoSignature
    • TCryptoExchangeKeyPair
    • TCryptoSessionKeyPair
    • TCryptoNPacket
    • TCryptoKK1Packet
    • TCryptoKK2Packet
    • TCryptoXX1Packet
    • TCryptoXX2Packet
    • TCryptoXX3Packet
    • TCryptoExchangeState
    • TCryptoPWHashMasterKey
    • TCryptoPWHashStoredKey
    • TCryptoPasswordHash

Math

    Matrix

    • Introduction
    • SMat2D
    • SMat2F
    • SMat2I
    • SMat3D
    • SMat3F
    • SMat3I
    • SMat4D
    • SMat4F
    • SMat4I

    Quaternion

    • Introduction
    • SQuatD
    • SQuatF
    • SQuatI

    Vector

    • Introduction
    • SVec2D
    • SVec2F
    • SVec2I
    • SVec3D
    • SVec3F
    • SVec3I
    • SVec4D
    • SVec4F
    • SVec4I

MaxGUI

  • MaxGUI.MaxGUI
  • MaxGUI.Drivers
  • MaxGUI.Localization
  • MaxGUI.ProxyGadgets
  • MaxGUI.CocoaMaxGUI
  • MaxGUI.Win32MaxGUIEx

Net

    Http

    • Introduction
    • THttpClient
    • THttpRequest
    • THttpResponse
    • THttpResult
    • TUrl
    • ICompleteListener
    • ICookie
    • THttpClientException
    • THttpCookie
    • THttpCookieBuilder
    • THttpField
    • THttpFields
    • TRetryPolicy
    • TUrlBuilder
    • TContent
    • TStringContent
    • TStreamContent
    • TBytePtrContent
    • TByteArrayContent
    • TBankContent
    • TCAStore
    • ECookieAttribute
    • EHttpAuthMethod
    • EHttpHeader
    • EHttpMethod
    • EUrlCode
    • EUrlPart

Random

    Core

    • Introduction
    • TRandom
  • Random.PRVHASH
  • Random.Secure
  • SFMT

    • Introduction
    • TSFMTRandom
  • Random.Squares
  • Random.Xoshiro

SDL

    SDL

    • Introduction
    • TSDLStream

    SDLSystem

    • Introduction
    • TSDLMultiGesture

    SDLVideo

    • Introduction
    • TSDLDisplay
    • TSDLGLContext
    • TSDLWindow

    SDLRender

    • Introduction
    • TSDLRenderer
    • TSDLTexture

    SDLTimer

    • Introduction
    • TSDLTimer

    SDLHaptic

    • Introduction
    • TSDLHaptic
    • TSDLHapticCondition
    • TSDLHapticConstant
    • TSDLHapticCustom
    • TSDLHapticDirection
    • TSDLHapticEffect
    • TSDLHapticLeftRight
    • TSDLHapticPeriodic
    • TSDLHapticRamp

    SDLSensor

    • Introduction
    • TSDLSensor
  • SDL.SDLFreeAudio
  • SDL.GLSDLMax2D
  • SDL.GL2SDLMax2D
  • SDL.D3D9SDLMax2D
  • SDLVirtualJoystick

    • Introduction
    • TVirtualJoystick

Steam

    SteamSDK

    • Introduction
    • TSteamClient
    • TSteamUtils
    • TSteamUserStats
    • TSteamFriends
    • TSteamUGC
    • ISteamFriendsListener
    • ISteamUGCListener
    • ISteamUserStatsListener
    • ISteamUtilsListener
    • EItemPreviewType
    • EPersonaChange
    • EPersonaState
    • ERemoteStoragePublishedFileVisibility
    • EUGCMatchingUGCType
    • EUGCQuery
    • EUserRestriction
    • EUserUGCList
    • EWorkshopFileType

Text

    CP932Encoding

    • Text.CP932Encoding

    CSV

    • Introduction
    • TCsvParser
    • TCsvHeader
    • TCsvRow
    • TCsvOptions
    • SCsvColumn

    Encoding

    • Text.Encoding

    Format

    • Introduction
    • TFormatter

    Graphviz

    • Introduction
    • TGVGraphviz
    • TAGraph

    Ini

    • Introduction
    • TIni
    • TIniProperty
    • TIniSection

    JConv

    • Introduction
    • TJConv
    • TJConvBuilder
    • TJConvSerializer

    Json

    • Introduction
    • TJSON
    • TJSONObject
    • TJSONString
    • TJSONInteger
    • TJSONReal
    • TJSONBool
    • TJSONArray
    • TJSONNull
    • TJSONError
    • TJSONNumber

    Markdown

    • Introduction
    • TMarkdown
    • IMDRenderer

    Pikchr

    • Introduction
    • EPikChrFlags

    Regex

    • Introduction
    • TRegEx
    • TRegExMatch
    • TRegExOptions
    • TRegExException

    TOML

    • Introduction
    • ETomlNodeType
    • TToml
    • ITomlNode
    • STomlDate
    • STomlDateTime
    • STomlTime
    • TTomlArray
    • TTomlInteger
    • TTomlString
    • TTomlTable
    • TTomlBoolean

    Xml

    • Introduction
    • TxmlDoc
    • TxmlNode
    • TxmlAttribute
Edit

THttpRequest

HTTP Request.

Represents an HTTP request, including method, URL, headers, and body content.

Methods

Method Header:THttpRequest(key:String, value:String)

Adds a header to the HTTP request.


Method Header:THttpRequest(key:EHttpHeader, value:String)

Adds a header to the HTTP request.


Method Headers:THttpRequest(fields:THttpFields)

Adds multiple headers to the HTTP request.


Method WithMethod:THttpRequest(_method:EHttpMethod)

Sets the HTTP method for the request.


Method Body:THttpRequest(text:String, contentType:String = "text/plain; charset=utf-8")

Sets the request body for the HTTP request to the specified text with the given content type.


Method Body:THttpRequest(stream:TStream, length:Long, contentType:String = "application/octet-stream")

Sets the request body for the HTTP request to the specified input stream with the given content type.


Method Body:THttpRequest(data:Byte[], contentType:String = "application/octet-stream")

Sets the request body for the HTTP request to the specified byte array data with the given content type.


Method Body:THttpRequest(content:TContent)

Sets the request body for the HTTP request to the specified content object content.


Method Body:THttpRequest(bank:TBank, contentType:String = "application/octet-stream")

Sets the request body for the HTTP request to the specified bank object bank with the given content type.


Method AuthMethod:THttpRequest(auth:EHttpAuthMethod)

Sets the authentication method for the HTTP request.


Method AcceptCompressed:THttpRequest(enable:Int)

Enables or disables acceptance of compressed responses. Defaults to enabled.


Method ConnectTimeout:THttpRequest(connectMs:Int)

Sets the connection timeout for the HTTP request in milliseconds. Defaults to 10000 ms.

Overrides the client-wide connection timeout setting for this specific request.


Method IdleTimeout:THttpRequest(idleMs:Int)

Sets the idle timeout for the HTTP request in milliseconds. Defaults to 60000 ms.

Overrides the client-wide idle timeout setting for this specific request.


Method TotalTimeout:THttpRequest(totalMs:Int)

Sets the total timeout for the HTTP request in milliseconds. Defaults to no timeout.

Overrides the client-wide total timeout setting for this specific request.


Method Scheme:THttpRequest(scheme:String)

Sets the URL scheme (e.g., "http" or "https").


Method Host:THttpRequest(host:String)

Sets the host for the HTTP request.


Method Port:THttpRequest(port:Int)

Sets the port for the HTTP request.


Method UserPassword:THttpRequest(user:String, password:String)

Sets the user and password for HTTP authentication.

When using Kerberos V5 authentication with a Windows based server, you should specify the username part with the domain name in order for the server to successfully obtain a Kerberos Ticket. If you do not then the initial part of the authentication handshake may fail.

When using NTLM, the username can be specified simply as the username without the domain name should the server be part of a single domain and forest.

To specify the domain name use either Down-Level Logon Name or UPN (User Principal Name) formats. For example EXAMPLE\user and user@example.com respectively.

Some HTTP servers (on Windows) support inclusion of the domain for Basic authentication as well.


Method User:THttpRequest(user:String)

Sets the user for HTTP authentication.

When using Kerberos V5 authentication with a Windows based server, you should specify the username part with the domain name in order for the server to successfully obtain a Kerberos Ticket. If you do not then the initial part of the authentication handshake may fail.

When using NTLM, the username can be specified simply as the username without the domain name should the server be part of a single domain and forest.

To specify the domain name use either Down-Level Logon Name or UPN (User Principal Name) formats. For example EXAMPLE\user and user@example.com respectively.

Some HTTP servers (on Windows) support inclusion of the domain for Basic authentication as well.


Method Password:THttpRequest(password:String)

Sets the password for HTTP authentication.


Method BearerToken:THttpRequest(token:String)

Sets a Bearer token for OAuth 2.0 authentication.


Method FollowRedirects:THttpRequest(follow:Int)

Sets whether the request should follow HTTP redirects automatically.

Defaults to True.


Method WithRetry:THttpRequest(policy:TRetryPolicy)

Sets the retry policy for the HTTP request.


Method UserAgent:THttpRequest(userAgent:String)

Sets the User-Agent header for the HTTP request.


Method GetPath:String()

Returns the path component of the URL for the HTTP request.


Method GetQuery:String()

Returns the query component of the URL for the HTTP request.


Method GetScheme:String()

Returns the URL scheme (e.g., "http" or "https").


Method OutputStream:THttpRequest(s:TStream)

Sets the output stream where the response body will be written.

If not set, the response body will be stored in memory and can be accessed via the THttpResponse object.


Method Cookie:THttpRequest(cookie:THttpCookie)

Adds a cookie to the request.


Method GetUrl:TUrl()

Returns the URL for the HTTP request.


Method IsFollowingRedirects:Int()

Returns whether the request is set to follow HTTP redirects automatically.


Method Verbose:THttpRequest(enable:Int)

Enables or disables verbose output for the request.

Useful for debugging purposes.


Method Send:THttpResponse()

Sends the HTTP request and returns the response.


Method SendAsync(listener:ICompleteListener)

Sends the HTTP request asynchronously.

The provided listener will be called upon completion of the request.


Method Response:THttpResponse()

Returns the HTTP response associated with this request.


Method IsSucceeded:Int()

Returns whether the HTTP request was successful.


Method IsFailed:Int()

Returns whether the HTTP request failed.


← THttpClientTHttpResponse →
  • Methods
    • Method Header:THttpRequest(key:String, value:String)
    • Method Header:THttpRequest(key:EHttpHeader, value:String)
    • Method Headers:THttpRequest(fields:THttpFields)
    • Method WithMethod:THttpRequest(_method:EHttpMethod)
    • Method Body:THttpRequest(text:String, contentType:String = "text/plain; charset=utf-8")
    • Method Body:THttpRequest(stream:TStream, length:Long, contentType:String = "application/octet-stream")
    • Method Body:THttpRequest(data:Byte[], contentType:String = "application/octet-stream")
    • Method Body:THttpRequest(content:TContent)
    • Method Body:THttpRequest(bank:TBank, contentType:String = "application/octet-stream")
    • Method AuthMethod:THttpRequest(auth:EHttpAuthMethod)
    • Method AcceptCompressed:THttpRequest(enable:Int)
    • Method ConnectTimeout:THttpRequest(connectMs:Int)
    • Method IdleTimeout:THttpRequest(idleMs:Int)
    • Method TotalTimeout:THttpRequest(totalMs:Int)
    • Method Scheme:THttpRequest(scheme:String)
    • Method Host:THttpRequest(host:String)
    • Method Port:THttpRequest(port:Int)
    • Method UserPassword:THttpRequest(user:String, password:String)
    • Method User:THttpRequest(user:String)
    • Method Password:THttpRequest(password:String)
    • Method BearerToken:THttpRequest(token:String)
    • Method FollowRedirects:THttpRequest(follow:Int)
    • Method WithRetry:THttpRequest(policy:TRetryPolicy)
    • Method UserAgent:THttpRequest(userAgent:String)
    • Method GetPath:String()
    • Method GetQuery:String()
    • Method GetScheme:String()
    • Method OutputStream:THttpRequest(s:TStream)
    • Method Cookie:THttpRequest(cookie:THttpCookie)
    • Method GetUrl:TUrl()
    • Method IsFollowingRedirects:Int()
    • Method Verbose:THttpRequest(enable:Int)
    • Method Send:THttpResponse()
    • Method SendAsync(listener:ICompleteListener)
    • Method Response:THttpResponse()
    • Method IsSucceeded:Int()
    • Method IsFailed:Int()
BlitzMax
Docs
Getting StartedDownloadsAbout
Community
Resources
More
GitHubStarChat on Discord
Copyright © 2026 Bruce A Henderson