vibe.d beta banner
get vibe.d

Asynchronous I/O that doesn’t get in your way, written in D

Function HTTPRequest.contentType

Returns the mime type part of the 'Content-Type' header.

string contentType() scope @property scope @safe const;

void contentType (
  string ct
) scope @property scope @safe;

This function gets the pure mime type (e.g. "text/plain") without any supplimentary parameters such as "charset=...". Use contentTypeParameters to get any parameter string or headers["Content-Type"] to get the raw value.


Sönke Ludwig, Jan Krüger


© 2012-2015 Sönke Ludwig


Subject to the terms of the MIT license, as written in the included LICENSE.txt file.