tree-sitter-hurl/corpus/requests.txt

193 lines
2.4 KiB
Plaintext
Raw Normal View History

===
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)))
===
Request text body
===
POST https://somewhere.com?query=something
```
{
"some-name": "some-value"
}
```
HTTP 302
---
(source_file
(request_declaration
(request_literal)
(url))
(body
(text_body_declaration))
(response
(scheme_literal)
(status_code_pattern)))
===
Request text body json
===
POST https://somewhere.com?query=something
```json
{
"some-name": "some-value"
}
```
HTTP 302
---
(source_file
(request_declaration
(request_literal)
(url))
(body
(text_body_declaration))
(response
(scheme_literal)
(status_code_pattern)))