Learn R Programming

webmockr (version 0.1.0)

to_return: Expectation for what's returned from a stubbed request

Description

Set response status code, response body, and/or response headers

Usage

to_return(.data, ...)

to_return_(.data, ..., .dots)

Arguments

.data
input. Anything that can be coerced to a StubbedRequest class object
...
Comma separated list of variable names, passed on to lazyeval::lazy_dots(). accepts the following: status, body, headers
.dots
Used to work around non-standard evaluation

Value

an object of class StubbedRequest, with print method describing the stub