| 136 | } |
| 137 | |
| 138 | func responseCookiesToMap(resp *fasthttp.Response, cookieMap map[string]string) map[string]string { |
| 139 | resp.Header.VisitAllCookie(func(key, value []byte) { |
| 140 | c := &fasthttp.Cookie{} |
| 141 | c.ParseBytes(value) |
| 142 | if err := c.ParseBytes(value); err == nil { |
| 143 | cookieMap[string(key)] = string(c.Value()) |
| 144 | } else { |
| 145 | msg := fmt.Sprintf("Error parsing cookie %s: %s\n", string(value), err.Error()) |
| 146 | Print(msg, Red) |
| 147 | } |
| 148 | }) |
| 149 | |
| 150 | return cookieMap |
| 151 | } |
| 152 | |
| 153 | func urlEncodeAll(input string) string { |
| 154 | encoded := "" |