(hs []*Header, header http.Header)
| 88 | } |
| 89 | |
| 90 | func ToHeader(hs []*Header, header http.Header) { |
| 91 | for _, h := range hs { |
| 92 | // http.Header expects header to be stored in canonical form, |
| 93 | // otherwise they are inaccessible with Get() on a http.Header struct. |
| 94 | header[http.CanonicalHeaderKey(h.Key)] = h.Values |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | func FromHeader(hs http.Header) []*Header { |
| 99 | result := make([]*Header, 0, len(hs)) |
no outgoing calls