(path: string, options: Options)
| 307 | } |
| 308 | |
| 309 | urlFor(path: string, options: Options) { |
| 310 | const params = []; |
| 311 | if (options.params) { |
| 312 | for (const key in options.params) { |
| 313 | params.push(`${key}=${encodeURIComponent(options.params[key] as string)}`); |
| 314 | } |
| 315 | } |
| 316 | if (params.length) { |
| 317 | path += `?${params.join('&')}`; |
| 318 | } |
| 319 | return this.apiRoot + path; |
| 320 | } |
| 321 | |
| 322 | parseResponse(response: Response) { |
| 323 | const contentType = response.headers.get('Content-Type'); |
no outgoing calls
no test coverage detected