Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
type(content_type) {
let t = mime.lookup(content_type)
if (!t) {
return this
}
let charset = ""
if (mime.charsets.lookup(t)) charset = "; charset=utf-8"
this.headers["Content-Type"] = t + charset
return this
}