Skip to content

Commit 8cca5ad

Browse files
committed
README.md updated
1 parent 7a220c9 commit 8cca5ad

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,20 +87,32 @@ httpResponseJson(500, { errorForDeveloper: "", errorForUser: "" });
8787

8888
```typescript
8989
const HTTP_HEADER: { [key: string]: string };
90+
// HTTP_HEADER.CONTENT_LENGTH -> "Content-Length"
9091
const HTTP_MEDIA_TYPE: { [key: string]: string };
92+
// HTTP_MEDIA_TYPE.IMAGE_WEBP -> "image/webp"
9193
const HTTP_METHOD: { [key: string]: string };
94+
// HTTP_METHOD.POST -> "POST"
9295
const STATUS_CODE_EMPTY: number[];
96+
// [ 204, 205, 304 ]
9397
const STATUS_CODE_REDIRECT: number[];
98+
// [300, 301, 302, 303, 305, 307, 308]
9499
const STATUS_CODE_RETRY: number[];
100+
// [502, 503, 504]
95101
const STATUS_CODE_TAG: { [key: string]: number };
102+
// STATUS_CODE_TAG.FORBIDDEN -> 403
96103
const STATUS_CODE_TEXT: { [key: string]: string };
104+
// STATUS_CODE_TEXT["202"] -> "Accepted"
97105
function httpResponse(code: number | string, message?: string | object): { [key: string]: any; };
106+
// httpResponse(202) -> { message: 'Accepted', statusCode: 202 }
98107
function httpResponseHtml(code: number | string, message?: string | object): string;
99108
function httpResponseJson(code: number | string, message?: string | object): string;
109+
// httpResponseJson(202) -> {"message":"Accepted","statusCode":202}
100110
function httpResponseText(code: number | string, message?: string | object): string;
101111
function httpResponseXml(code: number | string, message?: string | object): string;
102112
function httpStatusCode(code: number | string): number;
113+
// httpStatusCode("404") -> 404
103114
function httpStatusText(code: number | string): string;
115+
// httpStatusText(404) -> "Not Found"
104116
```
105117

106118
---

0 commit comments

Comments
 (0)