New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

request-with-buffer

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

request-with-buffer

As simple as it gets

latest
Source
npmnpm
Version
3.0.3
Version published
Weekly downloads
13
-7.14%
Maintainers
1
Weekly downloads
 
Created
Source

Request With Buffer

As simple as it gets

Basic Usage

import { RequestService } from "request-with-buffer"

const requestService: RequestService = RequestService.getInstance()
const bufferIntervalInMilliSeconds: number = 60 * 60 * 1000 // hourly

const exampleURL: string = "http://api.open-notify.org/iss-now.json"

const options: any = {
    url: exampleURL,
}

const result: any = 
    await requestService.get(options, bufferIntervalInMilliSeconds)

console.log(result)

Advanced Usage

import { IBufferEntry, RequestService } from "request-with-buffer"

// see basic usage plus: 

const exampleURL: string = "http://api.open-notify.org/iss-now.json"

const options: any = {
    url: exampleURL,
}

// you might want to check what's in the buffer 
const bufferContent: IBufferEntry[] = requestService.getCompleteBufferContent()

// you might want to clear the buffer from time to time
requestService.deleteBuffer()

// you might want to clear a specific buffer entry from time to time
requestService.deleteBufferEntry(options)

Feedback

If you find any issues or want to share improvement proposals in general feel free to open an issue here.

Contribute

I am interested in save and useful enhancements. Feel free to create Pull Requests on my Repository.

Keywords

Request with Buffer

FAQs

Package last updated on 25 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts