authorization enforced on webpages
This commit is contained in:
@@ -24,9 +24,9 @@ func Cookie(c http.Cookie) Response {
|
||||
|
||||
func (c cookieRes) String() string {
|
||||
if c.res != nil {
|
||||
return fmt.Sprintf(`{"cookie": %q, "nested": %s}`, c.cookie, c.res)
|
||||
return fmt.Sprintf(`{"cookie": %q, "nested": %s}`, &c.cookie, c.res)
|
||||
}
|
||||
return fmt.Sprintf(`{"cookie": %q}`, c.cookie)
|
||||
return fmt.Sprintf(`{"cookie": %q}`, &c.cookie)
|
||||
}
|
||||
|
||||
func (c cookieRes) wrap(res Response) Response {
|
||||
@@ -46,6 +46,10 @@ func (c cookieRes) JSON(body any) Response {
|
||||
return JSON(body).wrap(c)
|
||||
}
|
||||
|
||||
func (c cookieRes) Body(body io.ReadCloser) Response {
|
||||
return Body(body).wrap(c)
|
||||
}
|
||||
|
||||
func (c cookieRes) Cookie(ck http.Cookie) Response {
|
||||
return Cookie(ck).wrap(c)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user