Skip to content

Commit

Permalink
fix: pass Headers to createFetch (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz authored Mar 2, 2022
1 parent d567435 commit 0b55f3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import './config'
import { createApp, useBase } from 'h3'
import { createFetch } from 'ohmyfetch'
import { createFetch, Headers } from 'ohmyfetch'
import destr from 'destr'
import { createCall, createFetch as createLocalFetch } from 'unenv/runtime/fetch/index'
import { timingMiddleware } from './timing'
Expand All @@ -21,6 +21,6 @@ export const handle = useBase(process.env.ROUTER_BASE, app)
export const localCall = createCall(handle)
export const localFetch = createLocalFetch(localCall, globalThis.fetch)

export const $fetch = createFetch({ fetch: localFetch })
export const $fetch = createFetch({ fetch: localFetch, Headers })

globalThis.$fetch = $fetch

0 comments on commit 0b55f3c

Please sign in to comment.