@cordxapp/request
TypeScript icon, indicating that this package has built-in type declarations

0.4.18 • Public • Published

@cordxapp/request

Custom logic for handling requests how you want to!


Documentation


Get Method

Commonjs

const { RequestClient } = require('@cordxapp/request');
const { get } = new RequestClient();

const response = await get('https://api.cordx.lol');

return console.log(response.message);

ES6

import { RequestClient } from '@cordxapp/request';
const req = new RequestClient();

const response = await req.get('https://api.cordx.lol');

return console.log(response.message);

Post Method

Commonjs

const { RequestClient } = require('@cordxapp/request');
const req = new RequestClient();

return req.post({ url: 'https://api.cordx.lol', body: 'SOME_BODY_HERE' });

ES6

import { RequestClient } from '@cordxapp/request';
const req = new RequestClient();

return req.post({ url: 'https://api.cordx.lol', body: 'SOME_BODY_HERE' });

Dependencies (6)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @cordxapp/request

    Weekly Downloads

    2

    Version

    0.4.18

    License

    none

    Unpacked Size

    42.4 kB

    Total Files

    11

    Last publish

    Collaborators

    • cordxapp