cleanup ContentType

This commit is contained in:
Ankit Mahato
2024-04-06 13:42:35 +05:30
parent 90eed294e7
commit 631c2e26d3
6 changed files with 8 additions and 8 deletions

View File

@ -148,9 +148,9 @@ public class Main {
// especially sets up Content-Type header if the request has a body
// and Content-Type is not explicitely set by the developer
if (hasBody &&
!requestModel.enabledHeadersMap.containsKey('Content-Type')) {
!requestModel.enabledHeadersMap.containsKey(kHeaderContentType)) {
result += templateRequestHeader
.render({"name": 'Content-Type', "value": contentType});
.render({"name": kHeaderContentType, "value": contentType});
}
// setting up rest of the request headers