miniprogram-network 底层数据处理流程
catch
of Promise)then
of Promise)Defaults
全局配置项目
transformSend(options: Exclude<FullOptions, 'transformSend' | 'transformResponse'>) => wx.Options | Promise<wx.Options>
发送前转换参数transformResponse(res: wx.SuccessCallbackResult, config: TFullOptions) => any | Promise<any>
数据返回转换参数Listeners
全局事件监听列表
[onSend(options: RequestOptions) => any]
; 发送前事件监听列表[onResponse(res: wx.RequestSuccessCallbackResult, options: RequestOptions) => any]
; 收到服务器响应事件监听列表[onComplete(res: wx.GeneralCallbackResult, options: RequestOptions) => any]
;每个操作完成事件响应[onReject(res: any | wx.GeneralCallbackResult, options: RequestOptions) => any]
;操作最终失败响应事件[onAbort(reason: any, options: RequestOptions) => any]
;取消操作响应事件handle
底层处理函数