summaryrefslogtreecommitdiff
path: root/packages/webapi/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'packages/webapi/src/lib')
-rw-r--r--packages/webapi/src/lib/fetch.ts13
1 files changed, 4 insertions, 9 deletions
diff --git a/packages/webapi/src/lib/fetch.ts b/packages/webapi/src/lib/fetch.ts
index c62c46e30..5dad4e5b4 100644
--- a/packages/webapi/src/lib/fetch.ts
+++ b/packages/webapi/src/lib/fetch.ts
@@ -3,7 +3,8 @@ import {
Headers,
Request,
Response,
-} from 'node-fetch/src/index.js'
+} from 'node-fetch'
+import type { RequestInit } from 'node-fetch'
import Stream from 'node:stream'
import * as _ from './utils'
@@ -11,7 +12,7 @@ export { Headers, Request, Response }
export const fetch = {
fetch(
- resource: string | URL | Request,
+ resource: string | Request,
init?: Partial<FetchInit>
): Promise<Response> {
const resourceURL = new URL(
@@ -62,13 +63,7 @@ export const fetch = {
type USVString = {} & string
interface FetchInit {
- body:
- | Blob
- | BufferSource
- | FormData
- | URLSearchParams
- | ReadableStream
- | USVString
+ body: RequestInit['body']
cache:
| 'default'
| 'no-store'