Skip to content

Commit bb57e44

Browse files
authored
Merge pull request #8 from dnnrly/feature/tables
Fix method table formatting
2 parents 09945cd + d8767d8 commit bb57e44

File tree

2 files changed

+64
-55
lines changed

2 files changed

+64
-55
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ export PATH := $(BASE_DIR)/bin:$(PATH)
1818

1919
.PHONY: install deps clean clean-deps test-deps build-deps deps test acceptance-test ci-test lint release update
2020

21-
install: deps
21+
install:
22+
$(GO_BIN) install -v ./cmd/$(NAME)
2223

2324
build:
2425
$(GO_BIN) build -v ./cmd/$(NAME)

methods.go

Lines changed: 62 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ https://developer.mozilla.org/en-US/docs/Web/HTTP/MEthods`,
1313
Name: "GET",
1414
Summary: "The GET method requests a representation of the specified resource. Requests using GET should only retrieve data.",
1515
Description: `The HTTP GET method requests a representation of the specified resource. Requests using GET should only retrieve data.
16-
Request has body No
17-
Successful response has body Yes
18-
Safe Yes
19-
Idempotent Yes
20-
Cacheable Yes
21-
Allowed in HTML forms Yes
16+
17+
Request has body No
18+
Successful response has body Yes
19+
Safe Yes
20+
Idempotent Yes
21+
Cacheable Yes
22+
Allowed in HTML forms Yes
2223
2324
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET`,
2425
},
@@ -30,12 +31,13 @@ https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET`,
3031
A response to a HEAD method should not have a body. If so, it must be ignored. Even so, entity headers describing the content of the body, like Content-Length may be included in the response. They don't relate to the body of the HEAD response, which should be empty, but to the body of similar request using the GET method would have returned as a response.
3132
3233
If the result of a HEAD request shows that a cached resource after a GET request is now outdated, the cache is invalidated, even if no GET request has been made.
33-
Request has body No
34-
Successful response has body No
35-
Safe Yes
36-
Idempotent Yes
37-
Cacheable Yes
38-
Allowed in HTML forms No
34+
35+
Request has body No
36+
Successful response has body No
37+
Safe Yes
38+
Idempotent Yes
39+
Cacheable Yes
40+
Allowed in HTML forms No
3941
4042
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD`,
4143
},
@@ -60,12 +62,12 @@ When the POST request is sent via a method other than an HTML form — like via
6062
Providing a block of data, such as the result of submitting a form, to a data-handling process;
6163
Extending a database through an append operation.
6264
63-
Request has body Yes
64-
Successful response has body Yes
65-
Safe No
66-
Idempotent No
67-
Cacheable Only if freshness information is included
68-
Allowed in HTML forms Yes
65+
Request has body Yes
66+
Successful response has body Yes
67+
Safe No
68+
Idempotent No
69+
Cacheable Only if freshness information is included
70+
Allowed in HTML forms Yes
6971
7072
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST`,
7173
},
@@ -75,25 +77,27 @@ https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST`,
7577
Description: `The HTTP PUT request method creates a new resource or replaces a representation of the target resource with the request payload.
7678
7779
The difference between PUT and POST is that PUT is idempotent: calling it once or several times successively has the same effect (that is no side effect), where successive identical POST may have additional effects, like passing an order several times.
78-
Request has body Yes
79-
Successful response has body No
80-
Safe No
81-
Idempotent Yes
82-
Cacheable No
83-
Allowed in HTML forms No
80+
81+
Request has body Yes
82+
Successful response has body No
83+
Safe No
84+
Idempotent Yes
85+
Cacheable No
86+
Allowed in HTML forms No
8487
8588
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT`,
8689
},
8790
{
8891
Name: "DELETE",
8992
Summary: "The DELETE method deletes the specified resource.",
9093
Description: `The HTTP DELETE request method deletes the specified resource.
91-
Request has body May
92-
Successful response has body May
93-
Safe No
94-
Idempotent Yes
95-
Cacheable No
96-
Allowed in HTML forms No
94+
95+
Request has body May
96+
Successful response has body May
97+
Safe No
98+
Idempotent Yes
99+
Cacheable No
100+
Allowed in HTML forms No
97101
98102
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE`,
99103
},
@@ -105,25 +109,27 @@ https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE`,
105109
For example, the CONNECT method can be used to access websites that use SSL (HTTPS). The client asks an HTTP Proxy server to tunnel the TCP connection to the desired destination. The server then proceeds to make the connection on behalf of the client. Once the connection has been established by the server, the Proxy server continues to proxy the TCP stream to and from the client.
106110
107111
CONNECT is a hop-by-hop method.
108-
Request has body No
109-
Successful response has body Yes
110-
Safe No
111-
Idempotent No
112-
Cacheable No
113-
Allowed in HTML forms No
112+
113+
Request has body No
114+
Successful response has body Yes
115+
Safe No
116+
Idempotent No
117+
Cacheable No
118+
Allowed in HTML forms No
114119
115120
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/CONNECT`,
116121
},
117122
{
118123
Name: "OPTIONS",
119124
Summary: "The OPTIONS method is used to describe the communication options for the target resource.",
120125
Description: `The HTTP OPTIONS method is used to describe the communication options for the target resource. The client can specify a URL for the OPTIONS method, or an asterisk (*) to refer to the entire server.
121-
Request has body No
122-
Successful response has body Yes
123-
Safe Yes
124-
Idempotent Yes
125-
Cacheable No
126-
Allowed in HTML forms No
126+
127+
Request has body No
128+
Successful response has body Yes
129+
Safe Yes
130+
Idempotent Yes
131+
Cacheable No
132+
Allowed in HTML forms No
127133
128134
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS`,
129135
},
@@ -133,12 +139,13 @@ https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS`,
133139
Description: `The HTTP TRACE method performs a message loop-back test along the path to the target resource, providing a useful debugging mechanism.
134140
135141
The final recipient of the request should reflect the message received, excluding some fields described below, back to the client as the message body of a 200 (OK) response with a Content-Type of message/http. The final recipient is either the origin server or the first server to receive a Max-Forwards value of 0 in the request.
136-
Request has body No
137-
Successful response has body No
138-
Safe No
139-
Idempotent Yes
140-
Cacheable No
141-
Allowed in HTML forms No
142+
143+
Request has body No
144+
Successful response has body No
145+
Safe No
146+
Idempotent Yes
147+
Cacheable No
148+
Allowed in HTML forms No
142149
143150
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/TRACE`,
144151
},
@@ -154,12 +161,13 @@ PATCH (like PUT) may have side-effects on other resources.
154161
To find out whether a server supports PATCH, a server can advertise its support by adding it to the list in the Allow or Access-Control-Allow-Methods (for CORS) response headers.
155162
156163
Another (implicit) indication that PATCH is allowed, is the presence of the Accept-Patch header, which specifies the patch document formats accepted by the server.
157-
Request has body Yes
158-
Successful response has body Yes
159-
Safe No
160-
Idempotent No
161-
Cacheable No
162-
Allowed in HTML forms No
164+
165+
Request has body Yes
166+
Successful response has body Yes
167+
Safe No
168+
Idempotent No
169+
Cacheable No
170+
Allowed in HTML forms No
163171
164172
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH`,
165173
},

0 commit comments

Comments
 (0)