// SetCookie implements `engine.Response#SetCookie` function. func (r *Response) SetCookie(c engine.Cookie) { cookie := new(fasthttp.Cookie) cookie.SetKey(c.Name()) cookie.SetValue(c.Value()) cookie.SetPath(c.Path()) cookie.SetDomain(c.Domain()) cookie.SetExpire(c.Expires()) cookie.SetSecure(c.Secure()) cookie.SetHTTPOnly(c.HTTPOnly()) r.Response.Header.SetCookie(cookie) }