Function
fetchMethod
(input: Parameters<typeof fetch>[0], init: Parameters<typeof fetch>[1])
Source from the content-addressed store, hash-verified
| 586 | } |
| 587 | |
| 588 | function fetchMethod(input: Parameters<typeof fetch>[0], init: Parameters<typeof fetch>[1]): string { |
| 589 | if (init?.method) return init.method.toUpperCase(); |
| 590 | if (input instanceof Request) return input.method.toUpperCase(); |
| 591 | return 'GET'; |
| 592 | } |
| 593 | |
| 594 | function fetchUrl(input: Parameters<typeof fetch>[0]): string { |
| 595 | if (typeof input === 'string') return input; |
Tested by
no test coverage detected