result_handlers: Simple functions to handle http response

result_handlersR Documentation

Simple functions to handle http response

Description

When creating operations from api one can define how the response from http should be handled. These functions can be used for simple result handling.

Usage

content_or_stop(x)

content_or_warning(x)

content_or_message(x)

Arguments

x

A response object from httr package (see response object in httr package documentation)

Details

See get_operations for details.

Value

Content of http response

Functions

  • content_or_warning(): Returns content or issues a warning

  • content_or_message(): Returns content or prints a message

Examples

## Not run: 
operations <- get_operations(api, handle_response = content_or_stop)

## End(Not run)

bergant/rapiclient documentation built on April 28, 2024, 7:34 a.m.