Merge branch 'main' into add-feature-checkbox

This commit is contained in:
Ashita Prasad
2024-01-06 03:04:06 +05:30
committed by GitHub
5 changed files with 17 additions and 5 deletions

View File

@ -105,7 +105,9 @@ print(data.decode("utf-8"))
var headers = requestModel.enabledHeadersMap;
if (headers.isNotEmpty || hasBody) {
hasHeaders = true;
if (hasBody) {
bool hasContentTypeHeader = headers.keys.any((k) => k.toLowerCase() == HttpHeaders.contentTypeHeader);
if (hasBody && !hasContentTypeHeader) {
headers[HttpHeaders.contentTypeHeader] =
kContentTypeMap[requestModel.requestBodyContentType] ?? "";
}