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

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

    Install

    npm i getweb

    DownloadsWeekly Downloads

    0

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    24.2 kB

    Total Files

    6

    Last publish

    Collaborators

    • xchairs