/kwest-text

detect encoding and convert etc...

Primary LanguageJavaScript

kwest-text Build Status Dependency Status

Text fetching middleware for the kwest module.

Installation

$ npm install --save kwest-text

Use

var kwestText = require('kwest-text'),
    kwest     = require('kwest-base'),
    request   = kwest.wrap(kwestText());

// requests text
request('http://www.example.com/some-encoded-text')
  .then(function (res) {
    // detects encoding and converts to utf-8
    console.log(res.body);
  })