Bob Rudis
8 years ago
No known key found for this signature in database
GPG Key ID: 1D7529BE14E2BBA9
2 changed files with
2 additions and
7 deletions
-
R/response.r
-
man/tidy_html.Rd
|
|
@ -1,9 +1,7 @@ |
|
|
|
#' @param encoding specify the encoding when tidying an \code{httr} \code{response} |
|
|
|
#' object. Default to "\code{UTF-8}". |
|
|
|
#' @export |
|
|
|
#' @rdname tidy_html |
|
|
|
tidy_html.response <- function(content, options=list(TidyXhtmlOut=TRUE), |
|
|
|
verbose=FALSE, encoding="UTF-8") { |
|
|
|
verbose=FALSE) { |
|
|
|
|
|
|
|
if (!grepl("html", content$headers[["content-type"]])) { |
|
|
|
stop("htmltidy only parses HTML content from httr::response objects", |
|
|
|
|
|
@ -12,7 +12,7 @@ |
|
|
|
\title{Tidy or "Pretty Print" HTML/XHTML Documents} |
|
|
|
\usage{ |
|
|
|
\method{tidy_html}{response}(content, options = list(TidyXhtmlOut = TRUE), |
|
|
|
verbose = FALSE, encoding = "UTF-8") |
|
|
|
verbose = FALSE) |
|
|
|
|
|
|
|
tidy_html(content, options = list(TidyXhtmlOut = TRUE), verbose = FALSE) |
|
|
|
|
|
|
@ -41,9 +41,6 @@ or \code{XML} packages.} |
|
|
|
\item{options}{named list of options} |
|
|
|
|
|
|
|
\item{verbose}{output document errors? (default: \code{FALSE})} |
|
|
|
|
|
|
|
\item{encoding}{specify the encoding when tidying an \code{httr} \code{response} |
|
|
|
object. Default to "\code{UTF-8}".} |
|
|
|
} |
|
|
|
\value{ |
|
|
|
Tidied HTML/XHTML content. The object type will be the same as that of the input type |
|
|
|