buger / goreplay

GoReplay is an open-source tool for capturing and replaying live HTTP traffic into a test environment in order to continuously test your system with real data. It can be used to increase confidence in code deployments, configuration changes and infrastructure changes.
https://goreplay.org
Other
18.54k stars 13 forks source link

Could you tell me how to replay post's request body written json? #1078

Closed y-koyamatsu closed 2 years ago

y-koyamatsu commented 2 years ago

Hi! I would like to replay post's request body written json like below.

1 d0f71f9500000001bdd43c4f 1650532394697918000 0
POST /?id=1 HTTP/1.1
Content-Type: application/json
cache-control: no-cache
Accept: */*
Host: localhost:8085
accept-encoding: gzip, deflate
content-length: 134
Connection: keep-alive

{
    "status": "23 6 0 0 0 0 0 0 0 ",
    "printerMAC": "00:11:e5:06:04:ff",
    "statusCode": "200%20OK",
    "clientAction": null
}

I did below. repl.http = gor.setHttpBody(repl.http, gor.httpBody(repl.http));?

Is this correct???

Thanks!

y-koyamatsu commented 2 years ago

I solved this issue!