-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfaker.http
More file actions
69 lines (61 loc) · 1.92 KB
/
Copy pathfaker.http
File metadata and controls
69 lines (61 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# ทดสอบตัวแปร {{$faker ...}} ของ Cursor REST Client Plus
# ดูผลที่ได้ที่ https://webhook.site/#!/view/54aad5c3-bac1-421a-bb1b-54d6fa610b97
@webhook = https://webhook.site/54aad5c3-bac1-421a-bb1b-54d6fa610b97
@save = true
### ทดสอบ Faker ครบทุก type (POST JSON)
# @name faker-all-types
POST {{webhook}} HTTP/1.1
Content-Type: application/json
{
"person": {
"fullName": "{{$faker fullName}}",
"firstName": "{{$faker firstName}}",
"lastName": "{{$faker lastName}}",
"email": "{{$faker email}}",
"phone": "{{$faker phone}}"
},
"location": {
"city": "{{$faker city}}",
"country": "{{$faker country}}"
},
"company": "{{$faker company}}",
"ids": {
"uuid": "{{$faker uuid}}",
"ipv4": "{{$faker ipv4}}"
},
"time": {
"datetime": "{{$faker datetime}}",
"date": "{{$faker date}}"
},
"misc": {
"word": "{{$faker word}}",
"url": "{{$faker url}}",
"password": "{{$faker password}}",
"boolean": {{$faker boolean}},
"age": {{$faker int 18 60}},
"score": {{$faker int 1 100}}
}
}
### ทดสอบ Faker ใน query string (GET)
GET {{webhook}}?name={{$faker fullName}}&email={{$faker email}}&id={{$faker uuid}} HTTP/1.1
### ทดสอบ Faker int ช่วงตัวเลข (POST)
# @name faker-int-range
POST {{webhook}} HTTP/1.1
Content-Type: application/json
{
"min_1_10": {{$faker int 1 10}},
"min_100_999": {{$faker int 100 999}},
"min_0_10000": {{$faker int 0 10000}}
}
### ทดสอบสุ่มซ้ำ — แต่ละค่าควรไม่ซ้ำกันใน request เดียวกัน
POST {{webhook}} HTTP/1.1
Content-Type: application/json
{
"user_a": "{{$faker fullName}}",
"user_b": "{{$faker fullName}}",
"user_c": "{{$faker fullName}}",
"email_a": "{{$faker email}}",
"email_b": "{{$faker email}}"
}
###
GET https://dummyjson.com/product/23