rt_parse_response: Parse an RT response in its parts as a list

Description Usage Arguments Details Value

View source: R/rt_parse_response.R

Description

The RT API uses overrides default HTTP behavior with their own set of status codes, messages, and response formats. This function parses that custom implementation and presents it into something that's easier to build a package with.

Usage

1
rt_parse_response(response, verbose = FALSE)

Arguments

response

(character) Parsed response from content

verbose

(logical) Optional, defaults to TRUE. Prints more information during parsing.

Details

For example, a response like:

1
2
3
"RT/4.4.3 200 Ok

# Ticket 2 created.

is turned into the list:

1
2
3
4
5
6
7
8
$status
[1] 200

$message
[1] "Ok"

$body
[1] "# Ticket 2 created."

Value

(list) List with named elements status, message, and body


rt documentation built on April 28, 2020, 1:08 a.m.