% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/response-type.R
\name{http_type}
\alias{http_type}
\title{Extract the content type of a response}
\usage{
http_type(x)
}
\arguments{
\item{x}{A response}
}
\value{
A string giving the complete mime type, with all parameters
stripped off.
}
\description{
Extract the content type of a response
}
\examples{
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"]]
}
