@orpc/server-standard-fetch
Advanced tools
Comparing version 0.0.0-next.63309dc to 0.0.0-next.64a419b
// src/body.ts | ||
import { contentDisposition, parseContentDisposition } from "@orpc/server-standard"; | ||
import { contentDisposition, parseContentDisposition, parseEmptyableJSON } from "@orpc/server-standard"; | ||
async function toStandardBody(re) { | ||
@@ -20,6 +20,3 @@ if (!re.body) { | ||
const text = await re.text(); | ||
if (!text) { | ||
return void 0; | ||
} | ||
return JSON.parse(text); | ||
return parseEmptyableJSON(text); | ||
} | ||
@@ -30,3 +27,4 @@ if (contentType.startsWith("multipart/form-data")) { | ||
if (contentType.startsWith("application/x-www-form-urlencoded")) { | ||
return new URLSearchParams(await re.text()); | ||
const text = await re.text(); | ||
return new URLSearchParams(text); | ||
} | ||
@@ -33,0 +31,0 @@ if (contentType.startsWith("text/")) { |
{ | ||
"name": "@orpc/server-standard-fetch", | ||
"type": "module", | ||
"version": "0.0.0-next.63309dc", | ||
"version": "0.0.0-next.64a419b", | ||
"license": "MIT", | ||
@@ -31,3 +31,3 @@ "homepage": "https://unnoq.com", | ||
"dependencies": { | ||
"@orpc/server-standard": "0.0.0-next.63309dc" | ||
"@orpc/server-standard": "0.0.0-next.64a419b" | ||
}, | ||
@@ -34,0 +34,0 @@ "scripts": { |
6961
144
+ Added@orpc/server-standard@0.0.0-next.64a419b(transitive)
- Removed@orpc/server-standard@0.0.0-next.63309dc(transitive)