View our GitHub

Please visit sails-docs on GitHub to view documentation on your mobile device.

Edit Page

Returns true if this request's declared "Content-Type" matches the specified media/mime type.

Specifically, this method matches the given type against this request's "Content-Type" header.



Assuming the request contains a "Content-Type" header, "text/html; charset=utf-8":'html');
// -> true'text/html');
// -> true'text/*');
// -> true

Is something missing?

If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the sails-docs repo. Once we merge it, the changes will be reflected on the website the next time it is deployed.


We wrote a book!

Get early access to the book
with promotion code: mcneildoc

Get the Book