Golang has these two similar libs http
and httptest
and they both have the NewRequest
func.
Why do we even need the httptest.NewRequest
if http.NewRequest
does it all?
If I need to create a multipart/multiform request for my tests, which one do I need to use?