Skip to content

farpat/api-js

Repository files navigation

Build Status

Warning: This library is only used in front

Installation

npm install @farpat/api

Use

You can use verb " GET, POST, PUT, PATCH and DELETE ". Here are some examples of use :

import {jsonGet, jsonPost} from "@farpat/api";

jsonGet(
  '/path/to/resource', 
  {query_string:'value'},
  {header:'value'}
)
  .then()
  .catch()

jsonPost(
  '/path/to/resource', 
  {key: 'value'}, //or FormData 
  {header: 'value'}
)
  .then()
  .catch()

// and " put, patch, delete " verbs;

About

A http client in javascript

Resources

Stars

Watchers

Forks

Packages

No packages published