(reqInput: RequestInput)
| 110 | } |
| 111 | |
| 112 | function softNormalizeRequestInput(reqInput: RequestInput): RequestOptions { |
| 113 | let reqOptions: RequestOptions; |
| 114 | try { |
| 115 | reqOptions = normalizeRequestInput(reqInput); |
| 116 | } catch (err) { |
| 117 | reqOptions = {url: 'Error', _error: err}; |
| 118 | } |
| 119 | return reqOptions; |
| 120 | } |
| 121 | |
| 122 | function normalizeRequestInput(reqInput: RequestInput): RequestOptions { |
| 123 | if (typeof reqInput === 'string') { |
no test coverage detected