The .contentype property is implemented as follows:
@propertydef contenttype(self): self.ensure_response() return self._response.headers['content-type']
The .headers property of the _response object is a dictionary-like class of headers. The content-type key will retrieve the content-type specified by the server. This call to the ensure_response() method simply ensures that the .read() function has been executed.