Openstatus www.openstatus.dev

Fix issue when test pinging a monitor endpoint (#410)

* do not include body when method is HEAD

* simplify checks for including request body

authored by

Kelvin Amoaba and committed by
GitHub
ed3d509e a21f46fc

+1 -1
+1 -1
apps/web/src/app/api/checker/regions/_checker.ts
··· 123 123 ...headers, 124 124 }, 125 125 // Avoid having "TypeError: Request with a GET or HEAD method cannot have a body." error 126 - ...(data.method !== "GET" && { body: data?.body }), 126 + ...(data.method === "POST" && { body: data?.body }), 127 127 }); 128 128 129 129 return res;