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.
rt_parse_response(response, verbose = FALSE)
response | (character) Parsed response from |
---|---|
verbose | (logical) Optional, defaults to |
(list) List with named elements status, message, and body
For example, a response like:
"RT/4.4.3 200 Ok # Ticket 2 created.
is turned into the list:
$status [1] 200 $message [1] "Ok" $body [1] "# Ticket 2 created."