Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including wehttp with all npm packages installed. Try it out:

var wehttp = require("wehttp")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

wehttp v1.1.1

WeHttp是一个简单的微信小程序网络请求工具,它简化了小程序的网络请求函数,并且拥有类似axios.interceptors的拦截器(分别是before和after),这意味着你可以在网络请求前、请求后执行自定义函数;另外您可以定义全局的处理方法(可定义success、fail、before、after)。并且wehttp会自动帮你保存cookie以此来维持会话

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free