View source: R/response-type.R
http_type | R Documentation |
Extract the content type of a response
http_type(x)
x |
A response |
A string giving the complete mime type, with all parameters stripped off.
## Not run:
r1 <- GET("http://httpbin.org/image/png")
http_type(r1)
headers(r1)[["Content-Type"]]
r2 <- GET("http://httpbin.org/ip")
http_type(r2)
headers(r2)[["Content-Type"]]
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.