* @param {import('../../types/dispatcher.d.ts').default.DispatchOptions} opts
(opts)
| 148 | * @param {import('../../types/dispatcher.d.ts').default.DispatchOptions} opts |
| 149 | */ |
| 150 | function makeCacheKey (opts) { |
| 151 | const origin = opts.origin ? opts.origin.toString() : '' |
| 152 | |
| 153 | let fullPath = opts.path || '/' |
| 154 | |
| 155 | if (opts.query && !pathHasQueryOrFragment(fullPath)) { |
| 156 | fullPath = serializePathWithQuery(fullPath, opts.query) |
| 157 | } |
| 158 | |
| 159 | return { |
| 160 | origin, |
| 161 | method: opts.method, |
| 162 | path: fullPath, |
| 163 | headers: opts.headers |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | function appendHeader (headers, key, val) { |
| 168 | const headerName = key.toLowerCase() |
no test coverage detected