1.0.1 • Published 3 years ago

@tongh/easy-request v1.0.1

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

Request

A small and simply HTTP package for browser

Install

npm:

npm install @tongh/request

yarn:

yarn add @tongh/request

usage

	import { request } from "@tongh/request"
	request.post("http://localhost:9090/api/user/create", { name: "my name", sex: "gril" })
		.then((result) => {
			// todo...
		})
		.catch((error) => {
			// todo...
		})

this package exported two methods request and Request. the fomer is a Request instance

the fomer is a class. used to custom your own request with new keyvalue. for example

1.0.1

3 years ago