MCPcopy Create free account
hub / github.com/goadesign/goa / CookiePath

Function CookiePath

dsl/http.go:545–552  ·  view source on GitHub ↗

CookiePath defines the "path" attribute of a HTTP response cookie. CookiePath must appear in a Cookie expression. CookiePath accepts one argument which is the path value. Example: var _ = Service("account", func() { Method("create", func() { Result(Account) HTTP(func() {

(p string)

Source from the content-addressed store, hash-verified

543// })
544// })
545func CookiePath(p string) {
546 _, ok := eval.Current().(*expr.HTTPResponseExpr)
547 if !ok {
548 eval.IncompatibleDSL()
549 return
550 }
551 cookieAttribute("path", p)
552}
553
554// CookieSecure initializes the "secure" attribute of a HTTP response cookie
555// with "Secure".

Callers 1

cookie_dsls.goFile · 0.85

Calls 3

CurrentFunction · 0.92
IncompatibleDSLFunction · 0.92
cookieAttributeFunction · 0.85

Tested by

no test coverage detected