Skip to content

Commit 4e31850

Browse files
committed
fix method for request init with rescript v11
1 parent 3a973a1 commit 4e31850

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Webapi/Webapi__Fetch.res

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ module RequestInit = {
309309

310310
@obj
311311
external make: (
312-
~_method: string=?,
312+
@as("method") ~_method: string=?,
313313
~headers: headersInit=?,
314314
~body: bodyInit=?,
315315
~referrer: string=?,
@@ -336,7 +336,7 @@ module RequestInit = {
336336
~integrity: string="",
337337
~keepalive: option<bool>=?,
338338
~signal: option<signal>=?,
339-
()
339+
(),
340340
) =>
341341
make(
342342
~_method=?map(encodeRequestMethod, method_),
@@ -351,7 +351,7 @@ module RequestInit = {
351351
~integrity,
352352
~keepalive?,
353353
~signal?,
354-
()
354+
(),
355355
)
356356
}
357357

@@ -403,7 +403,7 @@ module ResponseInit = {
403403
~status: option<int>=?,
404404
~statusText: option<string>=?,
405405
~headers: option<headersInit>=?,
406-
()
406+
(),
407407
) => make(~status?, ~statusText?, ~headers?, ())
408408
}
409409

@@ -436,4 +436,4 @@ module Response = {
436436
@val external fetch: string => Js.Promise.t<response> = "fetch"
437437
@val external fetchWithInit: (string, requestInit) => Js.Promise.t<response> = "fetch"
438438
@val external fetchWithRequest: request => Js.Promise.t<response> = "fetch"
439-
@val external fetchWithRequestInit: (request, requestInit) => Js.Promise.t<response> = "fetch"
439+
@val external fetchWithRequestInit: (request, requestInit) => Js.Promise.t<response> = "fetch"

0 commit comments

Comments
 (0)