@seayoo-web/request 3.3.2 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +61 -61
- package/dist/node.js +9 -9
- package/dist/{request.fetch-b7wSTFXy.js → request.fetch-B3ED8nRu.js} +6 -6
- package/dist/retry-CdUkYrFw.js +606 -0
- package/dist/wx.js +23 -23
- package/package.json +2 -6
- package/dist/index.cjs +0 -2
- package/dist/node.cjs +0 -1
- package/dist/request.fetch-zj8Hd-er.cjs +0 -1
- package/dist/retry-D-T4xE0P.cjs +0 -3
- package/dist/retry-DUa9q26R.js +0 -1178
- package/dist/wx.cjs +0 -1
package/dist/wx.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./retry-D-T4xE0P.cjs"),l=async function(e,o,u){return t.handleResponse(await t.retryRequest(p,e,o,u),e,o,u)},p=async function(e,o,u){const s=await t.convertOptions(e,o,u),a=s.method==="PATCH"?"POST":s.method,c=t.ye(s.url,s.params);return t.Ct.wx?new Promise(d=>{wx.request({url:c,data:s.body,header:s.headers,method:a,dataType:"string",responseType:"text",fail(){d({url:c,method:a,status:-1,statusText:t.RequestInternalError.Unknown,body:""})},success(n){d({url:c,method:a,status:n.statusCode,statusText:n.statusCode+"",headers:{...n.header},body:s.method==="HEAD"||n.statusCode===204?"":f(n.data)})}})}):{url:c,method:a,status:-1,statusText:t.RequestInternalError.NotSupport,body:""}};function f(e){return typeof e=="string"?e:e instanceof ArrayBuffer&&t.Ct.TextDecoder?new TextDecoder().decode(e):JSON.stringify(e)}function i(e){return new t.NetRequestHandler(l,e)}const r=i(),y=r.setConfig,R=r.head,g=r.get,q=r.post,h=r.del,x=r.put;exports.RequestInternalError=t.RequestInternalError;exports.getResponseRulesDescription=t.getResponseRulesDescription;exports.NetRequest=i;exports.del=h;exports.get=g;exports.head=R;exports.post=q;exports.put=x;exports.setGlobalConfig=y;
|