(params: URLSearchParams, key: string, value: Array<string> | string)
| 71 | } |
| 72 | |
| 73 | function appendParam(params: URLSearchParams, key: string, value: Array<string> | string) { |
| 74 | if (value !== undefined && value !== null) { |
| 75 | if (Array.isArray(value)) { |
| 76 | value.forEach((item) => params.append(key, item)) |
| 77 | } else { |
| 78 | params.append(key, value as string) |
| 79 | } |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | function isJsonHttp(headers: Headers | { [k: string]: string }): boolean { |
| 84 | const contentType = headers instanceof Headers ? headers.get('Content-Type') : headers['Content-Type'] |
no outgoing calls
no test coverage detected