Documentation
¶
Overview ¶
Package conditional implements HTTP conditional request handling using If-Match, If-None-Match, If-Modified-Since, and If-Unmodified-Since headers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Params ¶
type Params struct {
IfMatch []string `header:"If-Match" doc:"Succeeds if the server's resource matches one of the passed values."`
IfNoneMatch []string `` /* 169-byte string literal not displayed */
IfModifiedSince time.Time `header:"If-Modified-Since" doc:"Succeeds if the server's resource date is more recent than the passed date."`
IfUnmodifiedSince time.Time `header:"If-Unmodified-Since" doc:"Succeeds if the server's resource date is older or the same as the passed date."`
// contains filtered or unexported fields
}
Params holds the parsed HTTP conditional request headers for an operation.
func (*Params) Check ¶
Check evaluates all conditional headers against the given ETag and modification time, returning an HTTP status code and message if a precondition fails, or zero if all preconditions pass.
func (*Params) HasConditionalParams ¶
HasConditionalParams reports whether any conditional headers were provided in the request.
Click to show internal directories.
Click to hide internal directories.