(url string, jsonBytes []byte)
| 244 | } |
| 245 | |
| 246 | func makeRequestLoop(url string, jsonBytes []byte) { |
| 247 | var i int |
| 248 | isFirstIteration := true |
| 249 | for true { |
| 250 | if !isFirstIteration && _requestDelay != 0 { |
| 251 | time.Sleep(_requestDelay) |
| 252 | } |
| 253 | isFirstIteration = false |
| 254 | |
| 255 | if _numRequestsPerThread > 0 { |
| 256 | if i >= _numRequestsPerThread { |
| 257 | return |
| 258 | } |
| 259 | i++ |
| 260 | } |
| 261 | |
| 262 | makeRequest(url, jsonBytes) |
| 263 | } |
| 264 | } |
| 265 | |
| 266 | func makeRequest(url string, jsonBytes []byte) { |
| 267 | request, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonBytes)) |
no test coverage detected