diff --git a/templates/custom/http-client.ejs b/templates/custom/http-client.ejs index 0327f39..0a4fd26 100644 --- a/templates/custom/http-client.ejs +++ b/templates/custom/http-client.ejs @@ -195,6 +195,11 @@ export class HttpClient { r.data = (null as unknown) as T; r.error = (null as unknown) as E; + if(response.status === 204){ + r.data = {}; + return r; + } + if (!response.ok && response.status < 500) { const data = await r.json() r.data = data