Skip to content
This repository was archived by the owner on Jun 7, 2024. It is now read-only.

Commit e70ebad

Browse files
committed
examples: update README [ci skip]
1 parent f0991c4 commit e70ebad

File tree

1 file changed

+62
-12
lines changed

1 file changed

+62
-12
lines changed

examples/README.md

Lines changed: 62 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,76 @@ After compilation, you can use [wasmtime](https://github.com/bytecodealliance/wa
66
```
77
$ wasmtime -S http target/wasm32-wasi/debug/http_client.wasm
88
9-
status code: 200
10-
content-type: application/json
11-
content-length: 297
12-
access-control-allow-credentials: true
13-
server: gunicorn/19.9.0
14-
date: Sat, 11 May 2024 09:46:38 GMT
15-
access-control-allow-origin: *
16-
body:
9+
GET https://httpbin.org/get, status code: 200, body:
10+
{
11+
"args": {
12+
"a": "b"
13+
},
14+
"headers": {
15+
"Host": "httpbin.org",
16+
"X-Amzn-Trace-Id": "Root=1-6642db93-63a3489711d4d5247435ace8"
17+
},
18+
"origin": "...",
19+
"url": "https://httpbin.org/get?a=b"
20+
}
21+
22+
POST https://httpbin.org/post, status code: 200, body:
1723
{
1824
"args": {},
19-
"data": "hello",
25+
"data": "{\"data\": \"hello\"}",
2026
"files": {},
2127
"form": {},
2228
"headers": {
23-
"Content-Length": "5",
29+
"Content-Length": "17",
30+
"Content-Type": "application/json",
31+
"Host": "httpbin.org",
32+
"X-Amzn-Trace-Id": "Root=1-6642db96-4cc2ff4638eab42f4bd8d27f"
33+
},
34+
"json": {
35+
"data": "hello"
36+
},
37+
"origin": "...",
38+
"url": "https://httpbin.org/post"
39+
}
40+
41+
POST https://httpbin.org/post, status code: 200, body:
42+
{
43+
"args": {},
44+
"data": "",
45+
"files": {},
46+
"form": {
47+
"a": "b",
48+
"c": ""
49+
},
50+
"headers": {
51+
"Content-Length": "6",
52+
"Content-Type": "application/x-www-form-urlencoded",
53+
"Host": "httpbin.org",
54+
"X-Amzn-Trace-Id": "Root=1-6642db98-02c2f6a008c804fe46145f9c"
55+
},
56+
"json": null,
57+
"origin": "...",
58+
"url": "https://httpbin.org/post"
59+
}
60+
61+
POST https://httpbin.org/post, status code: 200, body:
62+
{
63+
"args": {},
64+
"data": "",
65+
"files": {
66+
"field2": "hello"
67+
},
68+
"form": {
69+
"field1": "value1"
70+
},
71+
"headers": {
72+
"Content-Length": "156",
73+
"Content-Type": "multipart/form-data; boundary=boundary",
2474
"Host": "httpbin.org",
25-
"X-Amzn-Trace-Id": "Root=1-663f3e7e-6e3f84f87a20aef56c58a344"
75+
"X-Amzn-Trace-Id": "Root=1-6642db99-2f1a72b618ad642e2ceee3a2"
2676
},
2777
"json": null,
28-
"origin": "……",
78+
"origin": "...",
2979
"url": "https://httpbin.org/post"
3080
}
3181
```

0 commit comments

Comments
 (0)