paramList: Parse HTTP parameter strings.

Description Usage Arguments Value Examples

View source: R/webdeveloper.R

Description

Parse HTTP parameter strings.

Usage

1
2
3
4
5
paramList(
  x,
  split = "&",
  custom_decode = list(pattern = c("+"), replacement = c(" "))
)

Arguments

x

A parameter string, likely accessed from req[["rook.input"]]$read_lines().

split

The character to use to split the parameter string into constituent parameters.

custom_decode

A named list, must consist of list(pattern = c(...), replacement = c(...)) where pattern contains characters to decode that are not included in utils::URLencode and replacement contains the character to replace the character passed in the same indexed position in pattern.

Value

A list, with names being parameter names and values being parameter values.

Examples

1
paramList("?param1=Test&param2=1234&param3=Example")

webdeveloper documentation built on Feb. 5, 2021, 5:07 p.m.