@octopod-service/web-getter
[![npm Version](https://img.shields.io/npm/v/@octopod-service/web-getter.svg)](https://www.npmjs.com/package/@octopod-service/web-getter)
Last updated 3 years ago by adriencastex .
Unlicense · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @octopod-service/web-getter 
SYNC missed versions from official npm registry.

web-getter for octopod

npm Version

Allow to download with a limited frequency a web page. It will queue a request to the service (one queue per hostname) and execute it when the timeout has been reached.

Install

npm install @octopod-service/web-getter

Usage

// TypeScript
import * as getter from '@octopod-service/web-getter'
// JavaScript
const getter = require('@octopod-service/web-getter');

const service = new getter.GetterService('http://...');
service.start();

Call

this.call<GetterServiceResult, GetterServiceRequest>('getter', 'request', {
    url: 'http://...'
}, (response, paths, cleanup) => {
    console.log(response.filePath);

    cleanup();
});
this.call<GetterServiceDirectResult, GetterServiceRequest>('getter', 'direct', {
    url: 'http://...'
}, (response, paths, cleanup) => {
    console.log(response.body);

    cleanup();
});

Current Tags

  • 1.0.5                                ...           latest (3 years ago)

6 Versions

  • 1.0.5                                ...           3 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 1
Last Month 4
Dependencies (3)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |