Socket
Socket
Sign inDemoInstall

getweb

Package Overview
Dependencies
0
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    getweb

A lightweight, fast and not async request module.


Version published
Weekly downloads
4
decreased by-20%
Maintainers
2
Install size
23.7 kB
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 06 Feb 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc