Skip to content

Releases: tuax/tua-api

v1.7.0

v1.6.1

03 Feb 03:52
Compare
Choose a tag to compare

fix: upgrade axios

v1.6.0

21 Jul 07:52
0b6106b
Compare
Choose a tag to compare

feat: v1.6.0 suport customFetch, support array args, add ctx.res.rawData (#47)

  • 支持 customFetch,即自定义请求函数
  • 支持接口使用数组类型参数
  • 添加 ctx.res.rawData 保存接口返回的原始数据,适用于接口返回非对象类型数据的场景。这时设置 afterFn([, ctx]) => ctx.res.rawData 即可。

v1.5.0

03 Mar 03:19
a83712a
Compare
Choose a tag to compare

feat(axios): use JSON.stringify and set content-type for post requests (#46)

v1.4.4

17 Feb 03:41
1f379af
Compare
Choose a tag to compare

fix(jsonp): do not set default callbackName, set default charset (#45)

  1. 修复 jsonp 有默认回调函数名,防止调用重复请求时报错
  2. 默认添加 charset: 'UTF-8',这样返回非英文数据时不报错
  3. 添加运行时参数 callback 用于标识回调函数参数的名称

https://tuateam.github.io/tua-api/config/runtime.html#callback-%E5%9B%9E%E8%B0%83%E5%87%BD%E6%95%B0%E5%8F%82%E6%95%B0%E7%9A%84%E5%90%8D%E7%A7%B0

v1.4.2, v1.4.3

16 Dec 13:53
Compare
Choose a tag to compare

fix: avoid generating the same apiFn's key (#44)

避免相同路径的接口在经过 name 参数自定义名称后,依然生成相同 key 的问题

v1.4.1

28 Oct 07:56
ccfde94
Compare
Choose a tag to compare

fix(jsonp, config): fix callbackName, host -> baseUrl (#43)

  • 修复 jsonp callbackName 展示问题
  • host -> baseUrl
  • 添加 combineUrls 用于 url 的连接,再也不用纠结地址结尾要不要加 /
  • 对于 query 的 key 也进行编码
  • 升级依赖,添加 all-contributors

v1.4.0

25 Sep 13:39
e5ea0ef
Compare
Choose a tag to compare

feat: beforeFn returns Promise<{header:{a:'b'}}> for axios's headers (#42)

https://tuateam.github.io/tua-api/config/common.html#header-%E8%AF%B7%E6%B1%82%E5%A4%B4

v1.3.5

11 Sep 07:20
Compare
Choose a tag to compare
  • refactor: type -> method, upper case to lower case (#41)
  • chore: upgrade depencencies, eslint auto fix

https://tuateam.github.io/tua-api/config/common.html#type-%E8%AF%B7%E6%B1%82%E7%B1%BB%E5%9E%8B

v1.3.4

07 Aug 07:27
18d243d
Compare
Choose a tag to compare