httpbin_app: Generic web app for testing HTTP clients

View source: R/httpbin.R

httpbin_appR Documentation

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())

Arguments

log

Whether to log requests to the standard output.

Value

A webfakes_app.

Examples

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()

webfakes documentation built on May 29, 2024, 2:24 a.m.