hurl/integration/tests_ok/post_json.curl

8 lines
1.0 KiB
Plaintext
Raw Normal View History

2023-02-06 16:20:01 +03:00
curl --header 'Content-Type: application/json' --data $'{\n "name": "Bob",\n "password": "&secret\\\\\'<>",\n "age": 30,\n "strict": true,\n "spacing": "\\n",\n "g_clef": "\\uD834\\uDD1E",\n "items": [true, "true", 1],\n "variable": "\\\\"\n}' 'http://localhost:8000/post-json'
curl --header 'Content-Type: application/json' --data '[1,2,3]' 'http://localhost:8000/post-json-array'
curl --header 'Content-Type: application/json' --data '"Hello"' 'http://localhost:8000/post-json-string'
curl --header 'Content-Type: application/json' --data '100' 'http://localhost:8000/post-json-number'
curl --header 'Content-Type: application/json' --data $'{\n "natural": 100,\n "negative": -1,\n "float": "3.333333333333333",\n "exponent": 100e100\n}' 'http://localhost:8000/post-json-numbers'
curl --header 'Content-Type: application/json' --data 'true' 'http://localhost:8000/post-json-boolean'
curl 'http://localhost:8000/get-name'
2023-02-06 16:20:01 +03:00
curl --header 'Content-Type: application/json' --data $'{\n "name": "Bob"\n}' 'http://localhost:8000/check_name'