MCPcopy Create free account
hub / github.com/ChromeDevTools/devtools-frontend / fetchToString

Function fetchToString

front_end/core/host/ResourceLoader.ts:198–205  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

196}
197
198async function fetchToString(url: string): Promise<string> {
199 try {
200 const response = await fetch(url);
201 return await response.text();
202 } catch (cause) {
203 throw new Error(`Failed to fetch ${url}`, {cause});
204 }
205}
206
207function canBeRemoteFilePath(url: string): boolean {
208 try {

Callers 1

loadAsStreamFunction · 0.85

Calls 2

fetchFunction · 0.85
textMethod · 0.45

Tested by

no test coverage detected