@zenrows/mcp 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,7 +12,8 @@ export async function browserFetch(method, path, apiKey, browserUrl, body) {
|
|
|
12
12
|
const response = await fetch(url, init);
|
|
13
13
|
let data;
|
|
14
14
|
const contentType = response.headers.get("content-type") ?? "";
|
|
15
|
-
|
|
15
|
+
const text = await response.text();
|
|
16
|
+
data = contentType.includes("application/json") && text ? JSON.parse(text) : text;
|
|
16
17
|
return { ok: response.ok, status: response.status, data };
|
|
17
18
|
}
|
|
18
19
|
export function browserError(result) {
|