(fetchEntry)
| 1 | export const getResponseTypeFromFetchType = (fetchEntry) => { |
| 2 | if (fetchEntry === 'python') return 'text'; |
| 3 | if (fetchEntry === 'javascript') return 'text'; |
| 4 | if (fetchEntry === 'css') return 'text'; |
| 5 | if (fetchEntry === 'js') return 'blob'; |
| 6 | if (fetchEntry === 'plugin') return 'text'; |
| 7 | if (fetchEntry === 'bytes') return 'arrayBuffer'; |
| 8 | return fetchEntry; |
| 9 | }; |
| 10 | |
| 11 | export function genericFetch(path, fetchType) { |
| 12 | const responseType = getResponseTypeFromFetchType(fetchType); |