Skip to content
This repository was archived by the owner on Nov 5, 2018. It is now read-only.

strongloop-archive/strong-caching-http-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Caching HTTP Client

Build Status NPM version

Overview

Strong-caching-http-client is an HTTP client with a transparent filesystem-based cache.

Usage

Installation

$ npm install strong-caching-http-client

API

The API is similar to the API of request.

var client = require('strong-caching-http-client');

client.request(
  'http://nodejs.org/',
  {
    cache: '/tmp/http-client-cache'
  },
  function(err, resp) {
    // resp is http.IncomingMessage
  }
);

Options:

  • cache Path to the directory where the client should keep cached data.
  • method GET/POST/etc.
  • headers Request headers (optional).
  • body Request body (optional). Either String, Buffer or Stream.
  • maxAge Accept a cached response whose age is no greater that the specified time in seconds. Default: 60.
  • maxStale Accept a cached response that has exceeded its expiration time (as set by maxAge option) by no more than the specified time in seconds.

About

DEPRECATED HTTP client with a transparent filesystem-based cache

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy