Skip to content

Commit 081bf76

Browse files
committed
Add ResquestMethod enum and its descriptions
1 parent 0fe4dc8 commit 081bf76

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

src/RequestMethod/index.ts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/**
2+
* HTTP defines a set of request methods to indicate the desired action to be performed for a given resource. Although they can also be nouns, these request methods are sometimes referred to as HTTP verbs. Each of them implements a different semantic, but some common features are shared by a group of them: e.g. a request method can be safe, idempotent, or cacheable.
3+
* Source {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods}
4+
*
5+
* @export
6+
* @enum {string}
7+
*/
8+
export enum RequestMethod {
9+
/**
10+
* @description The GET method requests a representation of the specified resource. Requests using GET should only retrieve data.
11+
*/
12+
GET = "GET",
13+
/**
14+
* @description The HEAD method asks for a response identical to a GET request, but without the response body.
15+
*/
16+
HEAD = "HEAD",
17+
/**
18+
* @description The POST method submits an entity to the specified resource, often causing a change in state or side effects on the server.
19+
*/
20+
POST = "POST",
21+
/**
22+
* @description The PUT method replaces all current representations of the target resource with the request payload.
23+
*/
24+
PUT = "PUT",
25+
/**
26+
* @description The DELETE method deletes the specified resource.
27+
*/
28+
DELETE = "DELETE",
29+
/**
30+
* @description The CONNECT method establishes a tunnel to the server identified by the target resource.
31+
*/
32+
CONNECT = "CONNECT",
33+
/**
34+
* @description The OPTIONS method describes the communication options for the target resource.
35+
*/
36+
OPTIONS = "OPTIONS",
37+
/**
38+
* @description The TRACE method performs a message loop-back test along the path to the target resource.
39+
*/
40+
TRACE = "TRACE",
41+
/**
42+
* @description The PATCH method applies partial modifications to a resource.
43+
*/
44+
PATCH = "PATCH",
45+
}

0 commit comments

Comments
 (0)