fix(common): auto unescape utf-8 issue in the request body (#5185)

This commit is contained in:
Anwarul Islam 2025-06-25 14:25:43 +06:00 committed by GitHub
parent 427a1811a5
commit 19362a4291
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,7 +12,7 @@ const Processors = {
process: (body: string): E.Either<Error, ContentType> =>
pipe(
parseJSONAs<unknown>(body),
E.map((json) => content.json(json, MediaType.APPLICATION_JSON)),
E.map(() => content.text(body, MediaType.APPLICATION_JSON)),
E.orElse(() => E.right(content.text(body, MediaType.TEXT_PLAIN)))
),
},