removed err value
This commit is contained in:
parent
ea253cbfb6
commit
0b3e33c392
@ -15,7 +15,7 @@ type ValueProvider[T any] func() T
|
||||
type AuthProvider ValueProvider[string]
|
||||
type RequestBodyProvider func() (io.Reader, string)
|
||||
|
||||
func Request(mods ...RequestModifier) (*http.Request, error) {
|
||||
func Request(mods ...RequestModifier) *http.Request {
|
||||
r := NewRequestBuilder()
|
||||
for _, mod := range mods {
|
||||
r = mod(r)
|
||||
|
@ -30,12 +30,12 @@ func NewRequestBuilderFromRequest(r *http.Request) *RequestBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
func (b *RequestBuilder) Build() (*http.Request, error) {
|
||||
func (b *RequestBuilder) Build() *http.Request {
|
||||
r, err := http.NewRequest(b.Method, b.URL.String(), b.Body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil
|
||||
}
|
||||
|
||||
r.Header = b.Header
|
||||
return r, nil
|
||||
return r
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user