Skip to content

Drozerah/node_events_emitter_https_lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js Event Based HTTPS GET Request Library

A library that defines a GET method to do HTTPS requests that emits a Node event

Usage:

const Request = require("./lib")
const request = new Request()

// Calling the .GET(url, user) method will launch the 'request emitted' event
request.GET('https://dev.to/', 'drozerah')

// The listener is listening the 'request emitted' event emitted by the .GET() method
let counter = 0
request.addListener("request emitted", (result) => {
    counter++
    result.reqId = counter
    console.log(result)
})
// return
// { statusCode: 200,
// reqErr: false,
// url: 'https://dev.to/',
// user: 'drozerah',
// userPath: 'https://dev.to/drozerah',
// reqId: 1 }

Useful links:

Author:

  • Thomas G. aka Drozerah - GitHub

License:

  • ISC © Thomas G. aka Drozerah

About

Node.js Event Based HTTPS GET Request Library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published