Files
explore/lib/api/isBodyAllowed.ts
tom goriunovandGitHub 4fa0edfae3 support 429 "Too many requests" API error (#1004)
* get client key on 429 error

* set key to cookie and pass it in query params

* move csrf-token header to useApiFetch

* pin host for preview

* actual layout

* support new changes in API

* proxy headers from API

* add header to request

* remove next.js proxy flag

* fix ts

* refactor

* add tests
2023-08-02 19:45:06 -04:00

4 lines
133 B
TypeScript

export default function isBodyAllowed(method: string | undefined | null) {
return method && ![ 'GET', 'HEAD' ].includes(method);
}