Request and response classes

The main raison d’être for reqres is to provide classes handling http requests and responses. As both are coded as R6 classes with reference semantics all functionality of the object are documented together with the class.

as.Request() is.Request()

HTTP Request Handling

as.list(<Response>) is.Response()

HTTP Response handling

Content parsing and formatting

A main part of working with http requests and responses is related to getting the content of a request and setting the content of a response. While the Request and Response classes handle content negotiation it is up to the developer to tell how data of a certain type should be parsed or formattet. reqres provides a range of parsers and formatters for common exchange formats in order to ease the pain of this part.

parse_json() parse_plain() parse_xml() parse_html() parse_multiform() parse_queryform() parse_table()

Pre-supplied parsing generators

default_parsers

A list of default parser mappings

format_json() format_plain() format_xml() format_html() format_table()

Pre-supplied formatting generators

default_formatters

A list of default formatter mappings

Utilities

reqres includes a small selection of utilities beyond the ones mentioned above, which are listed here.

to_http_date() from_http_date()

Format timestamps to match the HTTP specs