#' Decode the raw contents of an HTTP response and convert it to a list
#'
#' @param binary.stream The content field of an HTTP response to be decoded as a character
#' @return List variable of the 'contents' field from HTTP response
#' @keywords binary raw character json response
#' @export
#' @examples
#' readContent(http.response)
readContent <- function(binary.stream, flatten = FALSE) {
# Parse binary response into character
char.response <- readBin(binary.stream$content, "character")
# Convert the character response to json
json.response <- fromJSON(char.response, flatten = flatten)
# Return the json
json.response
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.