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)
| 543 | // }) |
| 544 | // }) |
| 545 | func 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". |
no test coverage detected