tangled
alpha
login
or
join now
dunkirk.sh
/
pstream-ng
1
fork
atom
pstream is dead; long live pstream
taciturnaxolotl.github.io/pstream-ng/
1
fork
atom
overview
issues
pulls
pipelines
mr feedback
Jorrin
2 years ago
b5cd297a
ad8c6709
+2
-7
1 changed file
expand all
collapse all
unified
split
src
backend
extension
request.ts
+2
-7
src/backend/extension/request.ts
reviewed
···
6
6
if (typeof body === "string") return "string";
7
7
if (body instanceof FormData) return "FormData";
8
8
if (body instanceof URLSearchParams) return "URLSearchParams";
9
9
-
if (typeof body === "object") return "object";
10
10
-
return undefined;
9
9
+
return "object";
11
10
}
12
11
13
12
export function convertBodyToObject(body: unknown): any {
14
13
if (body instanceof FormData || body instanceof URLSearchParams) {
15
15
-
const obj: Record<string, any> = {};
16
16
-
for (const [key, value] of body.entries()) {
17
17
-
obj[key] = value;
18
18
-
}
19
19
-
return obj;
14
14
+
return [...body];
20
15
}
21
16
return body;
22
17
}