Skip to content

Commit

Permalink
fix: allow more methods to use used (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin authored Feb 18, 2024
1 parent e8152fb commit d4e3c48
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/curvy-paws-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"x-fetch": patch
---

fix: allow more methods to use used
9 changes: 7 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,17 @@ export type URLSearchParamsOptions =
| URLSearchParamsInit
| object

// https://www.rfc-editor.org/rfc/rfc9110#section-9.1-4
export const ApiMethod = {
CONNECT: 'CONNECT',
DELETE: 'DELETE',
GET: 'GET',
POST: 'POST',
HEAD: 'HEAD',
OPTIONS: 'OPTIONS',
PATCH: 'PATCH',
POST: 'POST',
PUT: 'PUT',
DELETE: 'DELETE',
TRACE: 'TRACE',
} as const

export type ApiMethod = ValueOf<typeof ApiMethod>
Expand Down

0 comments on commit d4e3c48

Please sign in to comment.