🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

ray-api

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ray-api

ray api, httpclient

latest
npmnpm
Version
1.0.0
Version published
Weekly downloads
2
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

ray-api

author

ilex.h

useage

npm install ray-api


// web
import _Api from 'ray-api/lib/api';

// create instance
const Api = new _Api({
  headers: {
    'Accept': 'application/json',
    'Content-Type': 'application/json; charset=utf-8'
  }
});

export default Api;

// 使用
Api.get(url, {params, data}).then(res => res);
Api.head(url, {params, data}).then(res => res);
Api.post(url, {params, data}).then(res => res);
Api.del(url, {params, data}).then(res => res);
Api.put(url, {params, data}).then(res => res);
Api.options(url, {params, data}).then(res => res);
Api.patch(url, {params, data}).then(res => res);

API

props

nametypedefaultdescription
optsobject-请求参数

License

MIT

FAQs

Package last updated on 01 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts