perf(http): encode string bodies in op-layer (#12451)

Using serde_v8's StringOrBuffer
This commit is contained in:
Aaron O'Mullan 2021-10-26 22:00:01 +02:00 committed by GitHub
parent c5a35aba82
commit c27ef0ac7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 61 additions and 25 deletions

View file

@ -214,6 +214,8 @@
} else {
req.body.streamOrStatic.consumed = true;
reqBody = req.body.streamOrStatic.body;
// TODO(@AaronO): plumb support for StringOrBuffer all the way
reqBody = typeof reqBody === "string" ? core.encode(reqBody) : reqBody;
}
}