@ddcode_/eascalpi

1.3.7 • Public • Published

eascalpi

Easy use call api with functional


Installation

npm i @ddcode_/eascalpi
# with yarn
yarn add @ddcode_/eascalpi

Method

Name Type Description default
params string '?name=1&age=2' null
body object {name:'test',age:23} null
cType string insert 'file' type for uploaded null
wToken string for authorization Bearer token null
csrfToken string for validation csrf-token null

Usage

Simply use eascalpi and this can be reused in your javascript project.

import { callApi } from '@ddcode_/eascalpi';

//with async
const data = await callApi('POST','URL',{
  params: string,     //do not include this property if you do not use it
  body: object,       //do not include this property if you do not use it
  cType: string,      //do not include this property if you do not use it
  wToken: string,     //do not include this property if you do not use it
  csrfToken: string,  //do not include this property if you do not use it
});

console.log(data);

Readme

Keywords

Package Sidebar

Install

npm i @ddcode_/eascalpi

Weekly Downloads

3

Version

1.3.7

License

ISC

Unpacked Size

142 kB

Total Files

33

Last publish

Collaborators

  • ddcode_