Xojo Plugin
Xojo Plugin
Setting a HTTP Max Response Size
Demonstrates theMaxResponseSize property.
Chilkat Xojo Plugin Downloads
Dim success As Boolean
success = False
Dim http As New Chilkat.Http
Dim maxSz As UInt32
maxSz = 16384
http.MaxResponseSize = maxSz
// Try to get something larger, such as hamlet.xml which is 279658 bytes
Dim xmlStr As String
xmlStr = http.QuickGetStr("https://chilkatsoft.com/hamlet.xml")
If (http.LastMethodSuccess = False) Then
// If the LastErrorText contains the string "MaxResponseSize",
// then the HTTP request failed because the response body would've been larger than the max allowed response size.
System.DebugLog(http.LastErrorText)
Return
End If
System.DebugLog("OK")