Learn R Programming

webfakes (version 1.3.0)

httpbin_app: Generic web app for testing HTTP clients

Description

A web app similar to https://httpbin.org. See its specific docs. You can also see these docs locally, by starting the app:

httpbin <- new_app_process(httpbin_app())
browseURL(httpbin$url())

Usage

httpbin_app(log = interactive())

Value

A webfakes_app.

Arguments

log

Whether to log requests to the standard output.

Examples

Run this code
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()

Run the code above in your browser using DataLab