Package-internal HTTP-response helper
Source:R/manual_layer_responses.R
dot-get_decoded_response_body_or_stop.Rd
This is a package-internal function for code-deduplication within various manual-layer functions.
Usage
.get_decoded_response_body_or_stop(
resultObject,
result_format,
entire_json_is_result = FALSE
)
Arguments
- resultObject
Should be a return value from an API function which uses
.wrap_as_api_response
internally. These are functions which are manually edited after OpenAPI autogen.- entire_json_is_result
If false, return the
"value"
field from the JSON object. This is the right thing to do for returns from the REST server for almost all cases. The true case is only for getting the results from invoking registered Python UDFs from R, in which case the JSON result in its entirety is the UDF output.
Details
It wraps .get_raw_response_body_or_stop
by decoding
the raw response body using any of the three result-format types
we support for UDFs. It's a keystroke-saving wrapper around
.get_raw_response_body_or_stop
.