hurl/integration/tests_ok/post_json.hurl

60 lines
863 B
Plaintext
Raw Normal View History

2020-08-27 10:07:46 +03:00
POST http://localhost:8000/post-json
{
"name": "Bob",
2022-04-11 11:53:52 +03:00
"password": "&secret\\'<>",
"age": 30,
2021-07-25 09:19:56 +03:00
"strict": true,
"spacing": "\n",
2022-03-09 11:51:17 +03:00
"g_clef": "\uD834\uDD1E",
2022-06-21 10:19:13 +03:00
"items": [true, "true", 1],
"variable": "{{string_variable}}"
2020-08-27 10:07:46 +03:00
}
HTTP/1.0 200
POST http://localhost:8000/post-json-array
[1,2,3]
HTTP/1.0 200
POST http://localhost:8000/post-json-string
"Hello"
HTTP/1.0 200
POST http://localhost:8000/post-json-number
100
HTTP/1.0 200
POST http://localhost:8000/post-json-numbers
{
"natural": 100,
"negative": -1,
"float": "3.333333333333333",
"exponent": 100e100
}
HTTP/1.0 200
POST http://localhost:8000/post-json-boolean
true
HTTP/1.0 200
#
# Use variable in your input json
#
GET http://localhost:8000/get-name
HTTP/1.0 200
[Captures]
name: body
2021-07-25 09:19:56 +03:00
POST http://localhost:8000/check_name
2020-08-27 10:07:46 +03:00
{
2021-07-25 09:19:56 +03:00
"name": "{{name}}"
}