Mostly for mock transports (§31.12) and for tests. Real responses come back
from zu_perform().
Usage
zu_response(
status = 200L,
headers = NULL,
body = raw(),
url = NULL,
tls_version = NULL,
redirects = 0L,
trailers = NULL
)Arguments
- status
HTTP status, a whole number from 100 to 599.
- headers
Named character vector. Repeated names are allowed and are preserved (§18.3).
- body
A raw vector, or a string (encoded as UTF-8).
- url
The final URL.
- tls_version
TLS version string, or
NULLfor plain HTTP.- redirects
Number of redirects followed.
- trailers
Named character vector of trailer fields (§65.3), as
zu_resp_trailers()returns them: where gRPC carries its status.NULL, the default, means none were sent.