How to use the send.mime.charsets function in send

To help you get started, we’ve selected a few send examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github spirit-js / spirit / src / router / response-map.js View on Github external
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
  }

send

Better streaming static file server with Range and conditional-GET support

MIT
Latest version published 2 months ago

Package Health Score

86 / 100
Full package analysis