@cordxapp/request
v0.4.18
Published
Simple request logic for our internal modules
Downloads
4
Readme
@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' });