AddCookie appends a cookie to the side-effects. Convenience over manual slice ops; safe on a zero-value receiver.
(c *http.Cookie)
| 70 | // AddCookie appends a cookie to the side-effects. Convenience over manual |
| 71 | // slice ops; safe on a zero-value receiver. |
| 72 | func (s *ResponseSideEffects) AddCookie(c *http.Cookie) { |
| 73 | if c == nil { |
| 74 | return |
| 75 | } |
| 76 | s.Cookies = append(s.Cookies, c) |
| 77 | } |
| 78 | |
| 79 | // MetaFromGin builds a RequestMetadata from a gin.Context. The gin-aware |
| 80 | // transport (GraphQL resolver, REST handler mounted under Gin) calls this |
no outgoing calls