1.0.1 • Published 10 years ago

aitch v1.0.1

Weekly downloads
3
License
ISC
Repository
github
Last release
10 years ago

aitch

Toolkit for constructing hypertext service clients.

Installation

npm install legendary
npm install aitch

This module has a peer dependency on Legendary.

Usage

See API Docs.

Examples

Make an HTTP request against the GitHub API:

'use strict';

var aitch = require('aitch');

var client = new aitch.Client({
  transport: new aitch.Transport({
    hostname: 'api.github.com'
  }),
  headers: {
    host: 'api.github.com',
    accept: 'application/vnd.github.v3+json',
    'user-agent': 'novemberborn/aitch'
  }
});

var response = client.get({
  pathname: '/repos/novemberborn/aitch/releases'
});

response.stream.pipe(process.stdout);