Documentation
¶
Index ¶
- Constants
- func BasicAuth(username, password string) string
- func Fetch(ctx context.Context, url string, options ...fetch_config.Option) (*http.Response, []byte, error)
- func FetchJson[U any](ctx context.Context, url string, options ...fetch_config.Option) (*http.Response, U, error)
- func FetchJsonWithBody[U any, T any](ctx context.Context, url string, bodyValue T, options ...fetch_config.Option) (*http.Response, U, error)
- func FetchWithRequest(ctx context.Context, request *http.Request, options ...fetch_config.Option) (*http.Response, []byte, error)
- func GetMatchingAccept(clientSupportedMediaRanges []*motmedelHttpTypes.MediaRange, ...) *motmedelHttpTypes.ServerMediaRange
- func GetMatchingContentEncoding(clientSupportedEncodings []*motmedelHttpTypes.Encoding, ...) string
- func GetSingleHeader(name string, header http.Header) (string, error)
- func IfModifiedSinceCacheHit(ifModifiedSinceValue string, lastModifiedValue string) (bool, error)
- func IfNoneMatchCacheHit(ifNoneMatchValue string, etag string) bool
- func MakeStrongEtag(data []byte) string
- func ParseLastModifiedTimestamp(timestamp string) (time.Time, error)
Constants ¶
View Source
const AcceptContentIdentity = "identity"
Variables ¶
This section is empty.
Functions ¶
func FetchJsonWithBody ¶
func FetchWithRequest ¶
func GetMatchingAccept ¶
func GetMatchingAccept( clientSupportedMediaRanges []*motmedelHttpTypes.MediaRange, serverSupportedMediaRanges []*motmedelHttpTypes.ServerMediaRange, ) *motmedelHttpTypes.ServerMediaRange
func GetMatchingContentEncoding ¶
func GetMatchingContentEncoding( clientSupportedEncodings []*motmedelHttpTypes.Encoding, serverSupportedEncodingIdentifiers []string, ) string
GetMatchingContentEncoding returns the server encoding to use for a client's accepted encodings. Client quality values are authoritative between quality groups; within a group of equal quality the server's preference order decides (callers list their identifiers by preference, e.g. smallest variant first).
func IfModifiedSinceCacheHit ¶
func IfNoneMatchCacheHit ¶
func MakeStrongEtag ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.