Skip to content

Commit d7c5102

Browse files
committed
add multiple matcher example
1 parent 02b5126 commit d7c5102

2 files changed

Lines changed: 69 additions & 0 deletions

File tree

example-multiple-matchers.htsf

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
> GET https://httpbin.org/anything?data=%7B%22uuid1%22%3A%2210eadefa-58b8-4c3f-80d6-e6da08f58ae6%22%2C%22uuid2%22%3A%2220eadefa-58b8-4c3f-80d6-e6da08f58ae6%22%2C%22uuid3%22%3A%2230eadefa-58b8-4c3f-80d6-e6da08f58ae6%22%7D HTTP/1.1
2+
> Accept: application/json
3+
>
4+
5+
< HTTP/1.1 200 OK
6+
< Access-Control-Allow-Credentials: true
7+
< Access-Control-Allow-Origin: *
8+
< Connection: keep-alive
9+
< Content-Length: ⧆⧆\d+⧆
10+
< Content-Type: application/json
11+
< Date: ⧆⧆:date⧆
12+
< Server: gunicorn/19.9.0
13+
< Via: 1.1 vegur
14+
<
15+
< {
16+
< "args": {
17+
< "data": "{\"uuid1\":\"⧆⧆[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}⧆\",\"uuid2\":\"⧆uuid⧆[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}⧆\",\"uuid3\":\"⧆⧆[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}⧆\"}"⧆⧆ ⧆
18+
< },⧆⧆ ⧆
19+
< "data": "",⧆⧆ ⧆
20+
< "files": {},⧆⧆ ⧆
21+
< "form": {},⧆⧆ ⧆
22+
< "headers": {
23+
< "Accept": "application/json",⧆⧆ ⧆
24+
< "Accept-Encoding": "gzip",⧆⧆ ⧆
25+
< "Connection": "close",⧆⧆ ⧆
26+
< "Host": "httpbin.org",⧆⧆ ⧆
27+
< "User-Agent": "Go-http-client/1.1"⧆⧆ ⧆
28+
< },⧆⧆ ⧆
29+
< "json": null,⧆⧆ ⧆
30+
< "method": "GET",⧆⧆ ⧆
31+
< "origin": "⧆⧆\d+[.]\d+[.]\d+[.]\d+⧆",⧆⧆ ⧆
32+
< "url": "https://httpbin.org/anything?data={\"uuid1\"%3A\"10eadefa-58b8-4c3f-80d6-e6da08f58ae6\"%2C\"uuid2\"%3A\"20eadefa-58b8-4c3f-80d6-e6da08f58ae6\"%2C\"uuid3\"%3A\"30eadefa-58b8-4c3f-80d6-e6da08f58ae6\"}"⧆⧆ ⧆
33+
< }
34+
35+
> GET https://httpbin.org/anything?uuid=⧈uuid⧈ HTTP/1.1
36+
> Accept: application/json
37+
>
38+
39+
< HTTP/1.1 200 OK
40+
< Access-Control-Allow-Credentials: true
41+
< Access-Control-Allow-Origin: *
42+
< Connection: keep-alive
43+
< Content-Length: ⧆⧆\d+⧆
44+
< Content-Type: application/json
45+
< Date: ⧆⧆:date⧆
46+
< Server: gunicorn/19.9.0
47+
< Via: 1.1 vegur
48+
<
49+
< {
50+
< "args": {
51+
< "uuid": "20eadefa-58b8-4c3f-80d6-e6da08f58ae6"⧆⧆ ⧆
52+
< },⧆⧆ ⧆
53+
< "data": "",⧆⧆ ⧆
54+
< "files": {},⧆⧆ ⧆
55+
< "form": {},⧆⧆ ⧆
56+
< "headers": {
57+
< "Accept": "application/json",⧆⧆ ⧆
58+
< "Accept-Encoding": "gzip",⧆⧆ ⧆
59+
< "Connection": "close",⧆⧆ ⧆
60+
< "Host": "httpbin.org",⧆⧆ ⧆
61+
< "User-Agent": "Go-http-client/1.1"⧆⧆ ⧆
62+
< },⧆⧆ ⧆
63+
< "json": null,⧆⧆ ⧆
64+
< "method": "GET",⧆⧆ ⧆
65+
< "origin": "⧆⧆\d+[.]\d+[.]\d+[.]\d+⧆",⧆⧆ ⧆
66+
< "url": "https://httpbin.org/anything?uuid=20eadefa-58b8-4c3f-80d6-e6da08f58ae6"⧆⧆ ⧆
67+
< }

run-http-specs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ time (
2222

2323
http-spec -hostname api.subledger.com -scheme https \
2424
example-scheme-and-hostname-2.htsf || exit 1
25+
26+
http-spec example-multiple-matchers.htsf || exit 1
2527
) || exit 1
2628

2729
echo

0 commit comments

Comments
 (0)