You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We don't strictly need to invoke it in the same way, but any option that would correspond to one of the four arguments of NewRequestWithContext (ctx, method, url, body) should have similar behavior.
(This came about because @PaulMH wrote some perfectly normal looking r2 request code that didn't set the content length on a post.)
The text was updated successfully, but these errors were encountered:
Based on some digging I've done for #154, ISTM we may be better off removing the embedded http.Request from r2.Request and going back to a Request() helper that creates a request on the fly. If not, we have to worry about mutations to an http.Request that should have the same side affects that changes to http.NewRequest() arguments would have (we could do this just by calling http.NewRequest() and copying all the fields over, but this could be costly performance wise.
The current approach is to just manually construct an instance via
http.Request{ ... }
, but this misses out on goodies like setting the default protocol or the host.We don't strictly need to invoke it in the same way, but any option that would correspond to one of the four arguments of
NewRequestWithContext
(ctx
,method
,url
,body
) should have similar behavior.(This came about because @PaulMH wrote some perfectly normal looking
r2
request code that didn't set the content length on a post.)The text was updated successfully, but these errors were encountered: