You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

getweb

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

getweb

A lightweight, fast and not async request module.

0.0.1
npmnpm
Version published
Weekly downloads
1
-80%
Maintainers
1
Weekly downloads
 
Created
Source

DeepScan grade NPM info GitHub stars GitHub issues

NPM Info

getweb

A lightweight, fast and not async request module.

You can go to the documentation by clicking here.

Basic Example

const gw = require("getweb");

/* == GET == */
let request1 = gw.get("https://example.com");
console.log(request1.body);

//To get the object format;
let request2 = gw.get("https://example.com", {
    "json": true
});
console.log(request2.body);

/* == POST == */
let request3 = gw.post("https://example.com", {
    "data": {
        "message": "hello world"
    }
});
console.log(request3.body);

//In a different way;
let request4 = gw.post("https://example.com", {
    "body": {
        "message": "hello world"
    }
});
console.log(request4.body);

Other Examples

//HTML to JSON;
let request5 = gw.get("https://example.com", {
    "html": true,
    "json": true
});
console.log(request5.body);

//XML to JSON;
let request6 = gw.get("https://example.com", {
    "xml": true,
    "json": true
});
console.log(request6.body);

//JQuery mode;
let $ = gw.get("https://example.com", {
    "jquery": true
});
console.log($);
console.log($("div#id"));

Keywords

getweb

FAQs

Package last updated on 07 Aug 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