Skip to content

Commit

Permalink
Automatically parse application/xml.
Browse files Browse the repository at this point in the history
Closes #128
  • Loading branch information
hadley committed Aug 22, 2014
1 parent a8ada77 commit 5e96d87
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

* Now possible to specify both handle and url when making a request.

* Mime type `application/xml` is automatically parsed with ``XML::xmlParse()`.
(#128)

## Bug fixes

* `url_ok()` works correctly now, instead of always returning `FALSE`,
Expand Down
4 changes: 4 additions & 0 deletions R/content-parse.r
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ parsers$`text/xml` <- function(x, ...) {
need_package("XML")
XML::xmlParse(x, ...)
}
parsers$`application/xml` <- function(x, ...) {
need_package("XML")
XML::xmlParse(x, ...)
}
parsers$`text/csv` <- function(x, ...) {
read.csv(text = x, stringsAsFactors = FALSE, ...)
}
Expand Down

0 comments on commit 5e96d87

Please sign in to comment.