aboutsummaryrefslogtreecommitdiff
path: root/examples/http/test.http
diff options
context:
space:
mode:
authorAlexander Kiryukhin <a.kiryukhin@mail.ru>2022-01-31 02:31:43 +0300
committerAlexander Kiryukhin <a.kiryukhin@mail.ru>2022-01-31 02:31:43 +0300
commit440f3f4604f3489113f6705b8da67d839e52360e (patch)
tree9bc04f896cc79cbb4bb41adbe19aaaaa0592acba /examples/http/test.http
initial
Diffstat (limited to 'examples/http/test.http')
-rw-r--r--examples/http/test.http42
1 files changed, 42 insertions, 0 deletions
diff --git a/examples/http/test.http b/examples/http/test.http
new file mode 100644
index 0000000..d4e68b3
--- /dev/null
+++ b/examples/http/test.http
@@ -0,0 +1,42 @@
+POST http://localhost:8000/
+Content-Type: application/json
+
+{
+ "jsonrpc": "2.0",
+ "method": "multiply",
+ "params": {
+ "a": 2,
+ "b": 3
+ },
+ "id": 1
+}
+
+###
+
+POST http://localhost:8000/
+Content-Type: application/json
+
+{
+ "jsonrpc": "2.0",
+ "method": "divide",
+ "params": {
+ "a": 10,
+ "b": 3
+ },
+ "id": 2
+}
+
+###
+
+POST http://localhost:8000/
+Content-Type: application/json
+
+[
+ { "jsonrpc": "2.0", "method": "multiply", "params": { "a": 2, "b": 3 }, "id": 10 },
+ {"jsonrpc": "2.0", "method": "sum", "params": [1,2,4], "id": "1"},
+ {"jsonrpc": "2.0", "method": "notify_hello", "params": [7]},
+ {"jsonrpc": "2.0", "method": "subtract", "params": [42,23], "id": "2"},
+ {"foo": "boo"},
+ {"jsonrpc": "2.0", "method": "foo.get", "params": {"name": "myself"}, "id": "5"},
+ {"jsonrpc": "2.0", "method": "get_data", "id": "9"}
+] \ No newline at end of file