fake_response | R Documentation |
These functions allow mocking of HTTP requests without requiring an internet connection or server to run against. Their return shape is a 'httr' "response" class object that should behave like a real response generated by a real request.
fake_response(
request,
verb = "GET",
status_code = 200,
headers = list(),
content = NULL
)
request |
An 'httr' |
verb |
Character name for the HTTP verb, if |
status_code |
Integer HTTP response status |
headers |
Optional list of additional response headers to return |
content |
If supplied, a JSON-serializable list that will be returned
as response content with Content-Type: application/json. If no |
An 'httr' response class object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.