R/zzz.R

Defines functions extract_results

#' @importFrom httr GET
#' @importFrom httr warn_for_status
#' @importFrom httr status_code
#' @importFrom httr content

extract_results <- function(x) {
  httr::warn_for_status(x)

  if (httr::status_code(x) == 200) {
    return(httr::content(x)$result)
  }
}

Try the PostcodesioR package in your browser

Any scripts or data that you put into this service are public.

PostcodesioR documentation built on March 18, 2022, 8:04 p.m.