1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-04 18:57:03 +00:00

minor improvements

This commit is contained in:
Gerasimos (Makis) Maropoulos
2022-02-26 20:03:35 +02:00
parent 70a73ef80b
commit 09f494e406
4 changed files with 114 additions and 35 deletions

View File

@@ -35,6 +35,17 @@ func Timeout(d time.Duration) Option {
}
}
// Handler specifies an iris.Application or any http.Handler
// instance which can be tested using this Client.
//
// It registers a custom HTTP client transport
// which allows "fake calls" to the "h" server. Use it for testing.
func Handler(h http.Handler) Option {
return func(c *Client) {
c.HTTPClient.Transport = new(handlerTransport)
}
}
// PersistentRequestOptions adds one or more persistent request options
// that all requests made by this Client will respect.
func PersistentRequestOptions(reqOpts ...RequestOption) Option {