1.0.20 • Published 3 years ago

fayfetch v1.0.20

Weekly downloads
19
License
ISC
Repository
-
Last release
3 years ago

fayfetch

https://github.com/p32929/FayFetch

A simple wrapper for Fetch ( https://www.npmjs.com/package/node-fetch )

npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io

Share

Sharing with your friends is just one click away from here

facebook twitter tumblr pocket pinterest reddit linkedin whatsapp

Support

If you like my works and want to support me/my works, feel free to support or donate. My payment details can be found here: https://p32929.github.io/SendMoney2Me/

How to use

Take a look at this example

const { FayFetch } = require('fayfetch')
// or
import {FayFetch} from 'fayfetch'

var body = {
    "username": "p32929",
    "password": "password"
}
var params = {
    "param1": "param1",
    "param2": "param2",
}

var headers = {
    "header1": "header1"
}

//
const url = "https://api.npoint.io/4d142c7ac93099c77456"
const callback = (status, jsonData, ok) => {
    if (ok) {
        // Success
    }
    else {
        // error
    }
}

//
FayFetch.get(url, params, headers, callback);

//
FayFetch.post(url, params, headers, body, callback);

//
FayFetch.put(url, params, headers, body, callback);

//
FayFetch.deletee(url, params, headers, callback);

//
FayFetch.upload(url, params, fileKeyString, fileObj, callback);

//
FayFetch.uploadUsingFormData(url, params, formData, callback);

LICENSE

MIT License

Copyright (c) 2020 Fayaz Bin Salam

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1.0.20

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago