removed err value

This commit is contained in:
Milarin 2024-09-11 19:19:00 +02:00
parent ea253cbfb6
commit 0b3e33c392
2 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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
}