Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

good-request

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

good-request

A highly-simple request package, featuring automatic retries if a request fails.

  • 1.2.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

good-request

A highly-simple request package, featuring automatic retries if a request fails. Based on the 2020-07-31 example documented at https://nodejs.org/api/http.html#http_http_request_options_callback .

Versions

  • 1.2.0, 2020-09-15, AMV : Added good-string-sort...
  • 1.1.0, 2020-09-15, AMV : I added more, yet to document...
  • 1.0.1, 2020-08-17, AMV : First publish.

Usage

const goodRequest = require('good-request');
// Functions provided:
goodRequest.basicPost         (urlString, ct,  reqText,               callback)
goodRequest.retryingPost      (urlString, ct,  reqText,    nRetries,  callback)
goodRequest.retryingJsonPost  (urlString,      reqObject,  nRetries,  callback)

callback provides an object with some of the following properties:

res.received:       true | undefined
res.statusCode:     response status integer | undefined
res.text:           response body string | undefined
res.error:          error object | undefined
res.errorsRetried:  array of error objects | undefined
res.object:         response body jso | undefined

Better to just peek at the code.

Keywords

FAQs

Package last updated on 15 Sep 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc