Learn R Programming

RestRserve (version 0.2.0.2)

ContentHandlers: Content handlers collection

Description

Controls how RestRserve encodes and decodes different content types. Designed to work jointly with EncodeDecodeMiddleware

Arguments

Format

R6::R6Class object.

Fields

  • handlers :: environment() Handlers storage environment.

Methods

  • get_encode(content_type) character(1) -> function Get encoder function for the specific content type.

  • get_decode(content_type) character(1) -> function Get decoder function for the specific content type.

  • set_encode(content_type, FUN) character(1), function -> self Set handler to encode body for the specific content type.

  • set_decode(content_type, FUN) character(1), function -> self Set handler to decode body for the specific content type.

  • reset() -> self Resets all the content handlers to RestRserve defaults.

  • to_list -> list Convert handlers to list.

See Also

Application EncodeDecodeMiddleware