httpbin_app: Generic web app for testing HTTP clients

Description Usage Arguments Value Examples

View source: R/httpbin.R

Description

A web app similar to https://httpbin.org.

Usage

1

Arguments

log

Whether to log requests to the standard output.

Value

A presser_app.

Examples

1
2
3
4
5
6
7
app <- httpbin_app()
proc <- new_app_process(app)
url <- proc$url("/get")
resp <- curl::curl_fetch_memory(url)
curl::parse_headers_list(resp$headers)
cat(rawToChar(resp$content))
proc$stop()

presser documentation built on July 1, 2020, 5:49 p.m.