* @param url - Request url * @param opts - Object of options for fetch()
(url: string, opts: any)
| 44 | * @param opts - Object of options for fetch() |
| 45 | */ |
| 46 | constructor(url: string, opts: any) { |
| 47 | this.url = url; |
| 48 | const { headers = {}, ...restOfTheOpts } = opts; |
| 49 | this.requestObj = { |
| 50 | method: 'GET', |
| 51 | headers: { |
| 52 | Accept: 'application/json', |
| 53 | 'Content-Type': 'application/json', |
| 54 | ...headers, |
| 55 | }, |
| 56 | ...restOfTheOpts, |
| 57 | }; |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * @param opts - RequestOptions - Fetch's Request type |
nothing calls this directly
no outgoing calls
no test coverage detected