DataScript: avi.http.get.response.body
Function | avi.http.get_response_body(size [,offset]) |
Description | Reads a specified number of kilobytes — not to exceed 32,768 kB (32 MB) — from the buffered body starting at the specified kilobyte offset. If the offset is not specified, reads from the beginning of the buffer. The buffered body will only be processed once by the LUA script. |
Events | HTTP_RESP_DATA |
Parameter | size is the number of kilobytes to be read. If specified, the minimum value is 1. The optional offset parameter determines the kilobyte offset at which the first byte is to be read. If specified, the minimum is 1. If not specified, 0 is assumed, i.e., bytes are read from the beginning of the buffer. |
Returns | If data exists, returns the data stored in the variable. Else returns nil. |
Related | avi.http.set_response_body_buffer_size() sets the maximum response body to be buffered. |
Example | Response Data Event Script:
Request Event Script:
|