feat: with json body

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2023-07-04 22:34:31 +02:00
parent c34df2ccaa
commit 20ea4b66b9
10 changed files with 3426 additions and 1037 deletions

20
corpus/assertions.txt Normal file
View File

@@ -0,0 +1,20 @@
===
Assertion
===
GET https://somewhere.com
HTTP 200
[Asserts]
---
(source_file
(request_declaration
(request_literal)
(url))
(response
(scheme_literal)
(status_code_pattern))
(assert_declaration
(assert_literal)))

View File

@@ -1,21 +1,22 @@
===
Comments
===
GET https://somewhere.com # some comment
GET https://somewhere.com # some comment
# comment
HTTP 200 # comment
HTTP 200
# comment
---
(source_file
(request_declaration
(request_literal)
(url))
(comment)
(comment)
(response
(scheme_literal)
(status_code_pattern))
(comment))
(request_literal)
(url))
(comment)
(comment)
(response
(scheme_literal)
(status_code_pattern))
(comment))

View File

@@ -116,3 +116,27 @@ HTTP 302
(response
(scheme_literal)
(status_code_pattern)))
===
Request body json
===
POST https://somewhere.com?query=something
{
"some-name": "some-value"
}
HTTP 302
---
(source_file
(request_declaration
(request_literal)
(url))
(body
(json_request_declaration))
(response
(scheme_literal)
(status_code_pattern)))