mirror of
https://github.com/foss42/apidash.git
synced 2025-08-06 05:32:26 +08:00
hasContentTypeHeader getter added to RequestModel
This commit is contained in:
@ -134,10 +134,7 @@ Map<String, dynamic> requestModelToHARJsonRequest(
|
||||
var headers =
|
||||
useEnabled ? requestModel.enabledHeadersMap : requestModel.headersMap;
|
||||
if (headers.isNotEmpty || hasBody) {
|
||||
bool hasContentTypeHeader = headers.keys
|
||||
.any((k) => k.toLowerCase() == HttpHeaders.contentTypeHeader);
|
||||
|
||||
if (hasBody && !hasContentTypeHeader) {
|
||||
if (hasBody && !requestModel.hasContentTypeHeader) {
|
||||
var m = {
|
||||
"name": "Content-Type",
|
||||
"value": kContentTypeMap[requestModel.requestBodyContentType] ?? ""
|
||||
|
Reference in New Issue
Block a user