Applies to

HTTPClient objects


When the AutoReadData property is enabled, the program reads the response body automatically. Values are:

TRUE – The program reads the response body automatically.

FALSE – The program will not read the response body automatically.


In a painter

To read the response body automatically:

  • Select the AutoReadData check box on the General page of the object's Properties view.

In scripts

The AutoReadData property takes a boolean value. The following line sets the AutoReadData property to true:

Integer li_rc
Blob lblb_NextData
HttpClient lnv_HttpClient 
lnv_HttpClient = Create HttpClient

// Not to read data automatically
lnv_HttpClient.AutoReadData = false

// Send GET request
li_rc = lnv_HttpClient.SendRequest("GET", "")

// Receive large data
if li_rc = 1 and lnv_HttpClient.GetResponseStatusCode() = 200 then
 do while true
  li_rc = lnv_HttpClient.ReadData(lblb_NextData, 1024*16)
  if li_rc = 0 then exit // Finish receiving data
  if li_rc = -1 then exit // Error occurs
end if