mirror of
https://github.com/foss42/apidash.git
synced 2025-05-23 01:06:46 +08:00
hasContentTypeHeader getter added to RequestModel
This commit is contained in:
@ -105,10 +105,7 @@ print(data.decode("utf-8"))
|
||||
var headers = requestModel.enabledHeadersMap;
|
||||
if (headers.isNotEmpty || hasBody) {
|
||||
hasHeaders = true;
|
||||
bool hasContentTypeHeader = headers.keys
|
||||
.any((k) => k.toLowerCase() == HttpHeaders.contentTypeHeader);
|
||||
|
||||
if (hasBody && !hasContentTypeHeader) {
|
||||
if (hasBody && !requestModel.hasContentTypeHeader) {
|
||||
headers[HttpHeaders.contentTypeHeader] =
|
||||
kContentTypeMap[requestModel.requestBodyContentType] ?? "";
|
||||
}
|
||||
|
Reference in New Issue
Block a user