Skip to content

Commit

Permalink
feat(#4244): add README.md and examples of http request. Also fixed t…
Browse files Browse the repository at this point in the history
…he (#4285)

ambiguity in the grammar.
  • Loading branch information
volodya-lombrozo authored Oct 15, 2024
1 parent 902cbcc commit 2b47574
Show file tree
Hide file tree
Showing 8 changed files with 209 additions and 214 deletions.
9 changes: 9 additions & 0 deletions http/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# HTTP Grammar

An ANTLR4 grammar for [HTTP](https://www.rfc-editor.org/rfc/rfc7230).
This grammar is based on the HTTP/1.1 specification (RFC 7230, RFC 7231)
and closely follows
the [ABNF](https://www.rfc-editor.org/rfc/rfc7230#appendix-B) format.

Currently, the grammar is incomplete and only supports the request line and
headers.
2 changes: 2 additions & 0 deletions http/examples/options.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
OPTIONS /&&&//&? HTTP/9.1
%%:
2 changes: 2 additions & 0 deletions http/examples/ping.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PING /google.com HTTP/1.1
Host: www.google.com.hk
2 changes: 0 additions & 2 deletions http/test.http → http/examples/post.http
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ X-Client-Data: CIi2yQEIorbJAQjBtskBCKmdygEIqKPKAQjwpMoBCLGnygEI4qjKAQjxqcoBCK+sy
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8
Cookie: NID=184=VqX86iUz6p-H_b2qbuogwjkmsk096DB-48jilOI9Pquzq8WT-aRbKsaH8UnMfvF9uHtuUtHhnJ7Z3F74bcpMNstJ5ADYV_tv09sXOJiwf3Yu-xsZ1E588v2tX6zA-J4K6c1t6t_PQP3jvtbVSdqw_YJqgU1elwvqkjzj0kBbk0I; 1P_JAR=2019-05-26-05; DV=42xzl48Lt5gpEFuauBIUhN0LQjoor5YtIbbBr4x5AQIAAAA

PING
4 changes: 4 additions & 0 deletions http/examples/trace.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
TRACE /&/&&//&&&/&&&&?/// HTTP/8.1
`````:C D
``: #### x y z
```:!!!
Loading

0 comments on commit 2b47574

Please sign in to comment.