Documentation
¶
Overview ¶
Package httputil provides HTTP-related utility functions.
Index ¶
- func DeleteHeader(headers map[string]string, name string) bool
- func GetHeader(headers map[string]string, name string) (string, bool)
- func GetHeaderFromSlice(headers map[string][]string, name string) (string, bool)
- func HasHeader(headers map[string]string, name string) bool
- func HasHeaderFromSlice(headers map[string][]string, name string) bool
- func SetHeader(headers map[string]string, name, value string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteHeader ¶
DeleteHeader removes a header (case-insensitive) from a map[string]string. Returns true if the header was found and deleted, false otherwise.
func GetHeader ¶
GetHeader retrieves a header value case-insensitively from a map[string]string. Returns the value and true if found, or empty string and false if not found.
func GetHeaderFromSlice ¶
GetHeaderFromSlice retrieves a header value case-insensitively from a map[string][]string. Returns the first value and true if found, or empty string and false if not found.
func HasHeaderFromSlice ¶
HasHeaderFromSlice checks if a header exists (case-insensitive) in a map[string][]string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.