1 parent a8f69b8 commit 6ff6435Copy full SHA for 6ff6435
1 file changed
api/cmd/loadtest/main.go
@@ -6,6 +6,8 @@ import (
6
"log"
7
"os"
8
9
+ "github.com/google/uuid"
10
+
11
"github.com/joho/godotenv"
12
13
"github.com/carlmjohnson/requests"
@@ -25,12 +27,12 @@ func main() {
25
27
Host("api.httpsms.com").
26
28
// Host("localhost:8000").
29
// Scheme("http").
- Header("x-api-key", os.Getenv("HTTPSMS_API_KEY")).
30
+ Header("x-api-key", os.Getenv("HTTPSMS_KEY")).
31
BodyJSON(&map[string]string{
- "content": fmt.Sprintf("testing http api sample: [%d]", i),
- "from": os.Getenv("SIM_1"),
32
- "to": os.Getenv("SIM_2"),
33
- "sim": "SIM2",
+ "content": fmt.Sprintf("Load Test[%d]", i),
+ "from": os.Getenv("HTTPSMS_FROM"),
34
+ "to": os.Getenv("HTTPSMS_TO"),
35
+ "request_id": fmt.Sprintf("load-%s-%d", uuid.NewString(), i),
36
}).
37
ToString(&responsePayload).
38
Fetch(context.Background())
0 commit comments