RequestDoer

Service responsible for sending HTTP requests.

RequestDoer of type httpctx.RequestDoer

This service is responsible for sending HTTP requests.

// RequestDoer describes ability to make HTTP(s) requests.
type RequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

To replace it with your own implementation use following setter:

func (apiCtx *APIContext) SetRequestDoer(r httpctx.RequestDoer)

Some examples of custom RequestDoer may be:

  • one with custom timeout
  • one with implemented tracing
  • one with custom http.Transport field