h3 0.3.4 → 0.3.5
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.
- package/dist/index.cjs +3 -0
- package/dist/index.mjs +3 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -201,6 +201,9 @@ function useRawBody(req, encoding = "utf-8") {
|
|
|
201
201
|
if (req[RawBodySymbol]) {
|
|
202
202
|
return Promise.resolve(encoding ? req[RawBodySymbol].toString(encoding) : req[RawBodySymbol]);
|
|
203
203
|
}
|
|
204
|
+
if (req._body) {
|
|
205
|
+
return Promise.resolve(req._body);
|
|
206
|
+
}
|
|
204
207
|
return new Promise((resolve, reject) => {
|
|
205
208
|
const bodyData = [];
|
|
206
209
|
req.on("error", (err) => {
|
package/dist/index.mjs
CHANGED
|
@@ -197,6 +197,9 @@ function useRawBody(req, encoding = "utf-8") {
|
|
|
197
197
|
if (req[RawBodySymbol]) {
|
|
198
198
|
return Promise.resolve(encoding ? req[RawBodySymbol].toString(encoding) : req[RawBodySymbol]);
|
|
199
199
|
}
|
|
200
|
+
if (req._body) {
|
|
201
|
+
return Promise.resolve(req._body);
|
|
202
|
+
}
|
|
200
203
|
return new Promise((resolve, reject) => {
|
|
201
204
|
const bodyData = [];
|
|
202
205
|
req.on("error", (err) => {
|