From b5f5a9e4dcace0589540bbf20a71d0312ca80e3f Mon Sep 17 00:00:00 2001 From: Red Date: Fri, 15 Nov 2024 15:42:29 +0700 Subject: [PATCH] fix: Remove POST from constants file --- src/constants.ts | 1 - test/request-handler.spec.ts | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 06f9a82..bd4d045 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -13,5 +13,4 @@ export const TIMEOUT_ERROR = 'TimeoutError'; export const CANCELLED_ERROR = 'CanceledError'; export const GET = 'GET'; -export const POST = 'POST'; export const HEAD = 'HEAD'; diff --git a/test/request-handler.spec.ts b/test/request-handler.spec.ts index 787b74a..436db2c 100644 --- a/test/request-handler.spec.ts +++ b/test/request-handler.spec.ts @@ -14,7 +14,6 @@ import { CHARSET_UTF_8, CONTENT_TYPE, GET, - POST, } from '../src/constants'; import { ResponseErr } from '../src/response-error'; @@ -297,7 +296,7 @@ describe('Request Handler', () => { { method: 'PUT', body: undefined, expectContentType: false }, { method: 'DELETE', body: { foo: 'bar' }, expectContentType: true }, { method: 'PUT', body: { foo: 'bar' }, expectContentType: true }, - { method: POST, body: undefined, expectContentType: true }, + { method: 'POST', body: undefined, expectContentType: true }, { method: GET, body: undefined, expectContentType: true }, ])( '$method request with body: $body',