( input: RequestInfo | URL, )
| 39 | type FetchFN = typeof fetch; |
| 40 | |
| 41 | export const fetchFunction: FetchFN = async ( |
| 42 | input: RequestInfo | URL, |
| 43 | ): Promise<Response> => { |
| 44 | const { config } = RNFetchBlob; |
| 45 | const urlToFetch: string = |
| 46 | typeof input === 'string' ? input : input.toString(); |
| 47 | const response: FetchBlobResponse = await config({ fileCache: true }).fetch( |
| 48 | 'GET', |
| 49 | urlToFetch, |
| 50 | ); |
| 51 | return await convertFetchBlobResponseToResponse(response); |
| 52 | }; |
| 53 | ///: END:ONLY_INCLUDE_IF |
no test coverage detected