request_factory.go 396 B

1234567891011121314151617
  1. package httpexpect
  2. import (
  3. "io"
  4. "net/http"
  5. )
  6. // DefaultRequestFactory is the default RequestFactory implementation which just
  7. // calls http.NewRequest.
  8. type DefaultRequestFactory struct{}
  9. // NewRequest implements RequestFactory.NewRequest.
  10. func (DefaultRequestFactory) NewRequest(
  11. method, url string, body io.Reader,
  12. ) (*http.Request, error) {
  13. return http.NewRequest(method, url, body)
  14. }