Comparing version 0.1.7 to 0.2.0
{ | ||
"name": "weio", | ||
"version": "0.1.7", | ||
"version": "0.2.0", | ||
"description": "Promise based HTTP client for for wechat miniprogram", | ||
@@ -5,0 +5,0 @@ "main": "./lib/weio.js", |
@@ -1,6 +0,16 @@ | ||
# Weio | ||
<div align="center"> | ||
<img src="https://yoneyy.gonghuolianmeng.com/2022-10-10-021650.png" alt="weio" style="zoom:30%;" /> | ||
</div> | ||
Promise based HTTP client for for wechat miniprogram | ||
<div align="center"> | ||
<img src="https://img.shields.io/github/stars/yoneyy/weio?color=yellow" /> | ||
<img src="https://img.shields.io/github/forks/yoneyy/weio" /> | ||
<img src="https://img.shields.io/github/issues/yoneyy/weio" /> | ||
<img src="https://img.shields.io/github/license/yoneyy/weio?logo=MIT" /> | ||
</div> | ||
## How to install it ? | ||
**Promise based HTTP client for for wechat miniprogram** | ||
## How to install `weio` ? | ||
```sh | ||
@@ -14,3 +24,10 @@ # yarn | ||
## How to use it ? | ||
## How to use `weio` ? | ||
安装完之后需在`微信开发者工具`在菜单栏中找到 `工具` --> `构建npm` | ||
After installation, you need to find the build npm option under Tools in the `WeChat Developer Tools` menu bar | ||
<img src="https://yoneyy.gonghuolianmeng.com/2022-10-10-014140.png" alt="Snipaste_2022-10-09_20-39-34" style="zoom:50%;" /> | ||
```ts | ||
@@ -29,4 +46,22 @@ // esm | ||
const {data: ret} = await request.put(url [,data] [,options]); | ||
const {data: ret} = await request.post(url [,data] [,options]); | ||
``` | ||
const {data: ret} = await request.put(url [,data [,options]]); | ||
const {data: ret} = await request.post(url [,data [,options]]); | ||
``` | ||
```ts | ||
// cjs | ||
const weio = require('weio'); | ||
const request = weio.create({ | ||
baseURL: 'https://example.com' | ||
}); | ||
const {data: ret} = await request.get(url [,options]); | ||
const {data: ret} = await request.head(url [,options]); | ||
const {data: ret} = await request.delete(url [,options]); | ||
const {data: ret} = await request.options(url [,options]); | ||
const {data: ret} = await request.put(url [,data [,options]]); | ||
const {data: ret} = await request.post(url [,data [,options]]); | ||
``` | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12457
10
66