Learn R Programming

webdeveloper (version 0.1.0)

paramList: Parse HTTP parameter strings.

Description

Parse HTTP parameter strings.

Usage

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

Run this code
# NOT RUN {
paramList("?param1=Test¶m2=1234¶m3=Example")
# }

Run the code above in your browser using DataLab