mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-16 11:19:11 +00:00
13 lines
243 B
Go
13 lines
243 B
Go
package api
|
|
|
|
import (
|
|
"io"
|
|
"net/http"
|
|
"net/http/httptest"
|
|
)
|
|
|
|
func newLoopbackRequest(method, target string, body io.Reader) *http.Request {
|
|
req := httptest.NewRequest(method, target, body)
|
|
req.RemoteAddr = "127.0.0.1:12345"
|
|
return req
|
|
}
|