resp_stream_raw()
retrieves bytes (raw
vectors).
resp_stream_lines()
retrieves lines of text (character
vectors).
resp_stream_sse()
retrieves server-sent events
from the stream. It currently only works with text mode connections so when calling
req_perform_connection()
you must use mode = "text"
.
resp_stream_raw(resp, kb = 32)resp_stream_lines(resp, lines = 1, max_size = Inf, warn = TRUE)
resp_stream_sse(resp, max_size = Inf)
# S3 method for httr2_response
close(con, ...)
resp_stream_raw()
: a raw vector.
resp_stream_lines()
: a character vector.
resp_stream_sse()
: a list with components type
, data
, and id
; or
NULL
, signifying that the end of the stream has been reached or--if in
nonblocking mode--that no event is currently available.
A streaming response created by req_perform_connection()
.
How many kilobytes (1024 bytes) of data to read.
The maximum number of lines to return at once.
The maximum number of bytes to buffer; once this number of bytes has been exceeded without a line/event boundary, an error is thrown.
Like readLines()
: warn if the connection ends without a final
EOL.
Not used; included for compatibility with generic.