package cookie
import "github.com/google/martian/v3/cookie"
Package cookie allows for the modification of cookies on http requests and responses.
Index ¶
- func NewFilter(cookie *http.Cookie) *filter.Filter
- func NewModifier(cookie *http.Cookie) martian.RequestResponseModifier
- type Matcher
Functions ¶
func NewFilter ¶
NewFilter builds a new cookie filter.
func NewModifier ¶
NewModifier returns a modifier that injects the provided cookie into the request or response.
Types ¶
type Matcher ¶
type Matcher struct {
// contains filtered or unexported fields
}
Matcher is a conditonal evalutor of request or response cookies to be used in structs that take conditions.
func NewMatcher ¶
NewMatcher builds a cookie matcher.
func (*Matcher) MatchRequest ¶
MatchRequest evaluates a request and returns whether or not the request contains a cookie that matches the provided name, path and value.
func (*Matcher) MatchResponse ¶
MatchResponse evaluates a response and returns whether or not the response contains a cookie that matches the provided name and value.
Source Files ¶
cookie_filter.go cookie_matcher.go cookie_modifier.go
- Version
- v3.3.2
- Published
- Mar 14, 2022
- Platform
- windows/amd64
- Imports
- 7 packages
- Last checked
- 4 hours ago –
Tools for package owners.