MCPcopy Index your code
hub / github.com/RustPython/RustPython / getResponseTypeFromFetchType

Function getResponseTypeFromFetchType

wasm/notebook/src/tools.js:1–9  ·  view source on GitHub ↗
(fetchEntry)

Source from the content-addressed store, hash-verified

1export 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
11export function genericFetch(path, fetchType) {
12 const responseType = getResponseTypeFromFetchType(fetchType);

Callers 1

genericFetchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected