tree-sitter-hurl/corpus/requests.txt
kjuulh 20ea4b66b9
feat: with json body
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-07-04 22:34:31 +02:00

143 lines
1.8 KiB
Plaintext

===
GET request
===
GET https://somewhere.com
---
(source_file
(request_declaration
(request_literal)
(url)))
===
POST request
===
POST https://somewhere.com?query=something
---
(source_file
(request_declaration
(request_literal)
(url)))
===
Headers
===
POST https://somewhere.com?query=something
some: header
---
(source_file
(request_declaration
(request_literal)
(url))
(header_declaration
(header_name)
(header_value)))
===
More Headers
===
POST https://somewhere.com?query=something
some: header
A123a-123: someAasdfasdfasdfc123
---
(source_file
(request_declaration
(request_literal)
(url))
(header_declaration
(header_name)
(header_value))
(header_declaration
(header_name)
(header_value))
)
===
HTTP Status codes 200
===
POST https://somewhere.com?query=something
HTTP 200
---
(source_file
(request_declaration
(request_literal)
(url))
(response
(scheme_literal)
(status_code_pattern)))
===
HTTP Status codes 302
===
POST https://somewhere.com?query=something
HTTP 302
---
(source_file
(request_declaration
(request_literal)
(url))
(response
(scheme_literal)
(status_code_pattern)))
===
HTTP Status codes 302
===
POST https://somewhere.com?query=something
Header: something
HTTP 302
---
(source_file
(request_declaration
(request_literal)
(url))
(header_declaration
(header_name)
(header_value))
(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)))