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
// ConditionalGet writes the body of url to w if the server provides a 200 response.
// If the response is 304, f is called to provide an io.Reader which will provide the body.
// If f is nil, and a 304 is encounted, StatusError{304} will be returned.
func ConditionalGet(w io.Writer, url, etag string, modtime time.Time, f ReaderMaker) (int64, error)
The text was updated successfully, but these errors were encountered:
Suggestion from dsal for a Conditional GET helper
type ReaderMaker func() (io.Reader, error)
// ConditionalGet writes the body of url to w if the server provides a 200 response.
// If the response is 304, f is called to provide an io.Reader which will provide the body.
// If f is nil, and a 304 is encounted, StatusError{304} will be returned.
func ConditionalGet(w io.Writer, url, etag string, modtime time.Time, f ReaderMaker) (int64, error)
The text was updated successfully, but these errors were encountered: