Skip to content

Commit

Permalink
fix: update fetch types
Browse files Browse the repository at this point in the history
  • Loading branch information
cncolder committed Jul 11, 2020
1 parent 9783e25 commit 55c1177
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/bom/fetch.ts
@@ -1,14 +1,14 @@
import Taro from '@tarojs/taro'
import { request } from '@tarojs/taro'

export const fetch: Window['fetch'] = async (input, init = {}) => {
const { method = 'GET', headers: header, body: data } = init
const res = await Taro.request({
const res = await request({
url: input as string,
method: method as Taro.request.Option['method'],
method: method,
dataType: 'text',
header: header,
header,
data,
})
} as request.Option)

return {
get type() {
Expand Down Expand Up @@ -59,5 +59,5 @@ export const fetch: Window['fetch'] = async (input, init = {}) => {
clone() {
return this
},
}
} as Response
}

0 comments on commit 55c1177

Please sign in to comment.