feat: override content-type (#2191)
Co-authored-by: Liyas Thomas <liyascthomas@gmail.com> Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
This commit is contained in:
@@ -203,7 +203,10 @@ export function getEffectiveRESTRequest(
|
||||
}
|
||||
|
||||
const effectiveFinalBody = getFinalBodyFromRequest(request, envVariables)
|
||||
if (request.body.contentType)
|
||||
const contentTypeInHeader = effectiveFinalHeaders.find(
|
||||
(x) => x.key.toLowerCase() === "content-type"
|
||||
)
|
||||
if (request.body.contentType && !contentTypeInHeader?.value)
|
||||
effectiveFinalHeaders.push({
|
||||
active: true,
|
||||
key: "content-type",
|
||||
|
||||
Reference in New Issue
Block a user