getweb
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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"));

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    6
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    6
  • 0.0.1
    0

Package Sidebar

Install

npm i getweb

Weekly Downloads

6

Version

0.0.2

License

MIT

Unpacked Size

24.3 kB

Total Files

6

Last publish

Collaborators

  • xchairs
  • roxza