Documentation
¶
Index ¶
- func Func(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request)
- func HandlerFunc(handler func(http.ResponseWriter, *http.Request)) http.HandlerFunc
- func HttpGet(ctx context.Context, url string) (*http.Response, error)
- func HttpPost(ctx context.Context, url string, contentType string, body io.Reader) (*http.Response, error)
- func HttpPostForm(ctx context.Context, url string, data url.Values) (*http.Response, error)
- func NewRoundTrip(ctx context.Context, t http.RoundTripper) http.RoundTripper
- type WrapRoundTrip
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Func ¶
func Func(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request)
wrapping handler function, example : http.HandleFunc(func(http.ResponseWriter, *http.Request))
func HandlerFunc ¶
func HandlerFunc(handler func(http.ResponseWriter, *http.Request)) http.HandlerFunc
wrapping type of http.HanderFunc, example : http.Handle(pattern, http.HandlerFunc)
func HttpPostForm ¶ added in v0.1.11
func NewRoundTrip ¶
func NewRoundTrip(ctx context.Context, t http.RoundTripper) http.RoundTripper
Types ¶
type WrapRoundTrip ¶
type WrapRoundTrip struct {
// contains filtered or unexported fields
}
func NewWrapRoundTrip ¶ added in v0.1.14
func NewWrapRoundTrip(ctx context.Context, t http.RoundTripper) *WrapRoundTrip
Click to show internal directories.
Click to hide internal directories.