Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add read_xml method for httr #63

Closed
hadley opened this issue Dec 10, 2015 · 3 comments
Closed

Add read_xml method for httr #63

hadley opened this issue Dec 10, 2015 · 3 comments

Comments

@hadley
Copy link
Member

hadley commented Dec 10, 2015

so (e.g.) read_xml(POST(url)) can work.

@hadley
Copy link
Member Author

hadley commented May 25, 2016

read_xml.response <- function(x, encoding = "", base_url = "", ...,
                              as_html = FALSE, options = "NOBLANKS") {

  content <- httr::content(x, type = "raw")
  read_xml(content, encoding = encoding, base_url = base_url, as_html = as_html,
    option = options, ...)

}

@hadley
Copy link
Member Author

hadley commented May 25, 2016

And corresponding read_html

@hadley
Copy link
Member Author

hadley commented May 25, 2016

And test: read_xml(httr::GET("http://httpbin.org/xml"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant