Miss any of our Open RFC calls?Watch the recordings here! »

miniprogram-request

0.1.0-alpha.0 • Public • Published

miniprogram-request npm version

A better Request package for MiniProgram API

小程序请求封装

Features

  • Promise
  • Cancelable
  • Queue
  • Wx request option
    • responseType
    • headers
    • dataType (merged into responseType)
    • timeout (not supported for each request)
  • Configuration
    • baseUri
    • replace parameters
    • Retry when network failure
    • authentication?
  • Interceptors in Lifecycle (only one,modify data or status)
    • transform request data
    • transform response data
  • Global Listeners
    • On Send (before request data send & after request data transformed)
    • On Response (after request response data transformed)
    • On resolved (before then of Promise)
    • On rejected (before catch of Promise)
    • On abort
    • On complete
  • On Progress?
  • pause/resume (promise/async instead)

API

  • request
  • create

LifeCircle

Request Life Circle

Install

npm i [email protected]

Version

0.1.0-alpha.0

License

Apache-2.0

Unpacked Size

40.8 kB

Total Files

21

Last publish

Collaborators

  • avatar