FayFetch
1.0.0
https://github.com/p32929/fayfetch
Fetch를위한 간단한 래퍼 (https://www.npmjs.com/package/node-petch)
친구들과 공유하는 것은 여기에서 한 번의 클릭만으로
내 작품을 좋아하고 저의 작품을 지원하고 싶다면 자유롭게 지원하거나 기부하십시오. 내 지불 세부 정보는 여기에서 찾을 수 있습니다 : https://p32929.github.io/sendmoney2me/
이 예를 살펴보십시오
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);
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.