mirror of
https://github.com/foss42/apidash.git
synced 2025-06-02 07:46:10 +08:00
Merge branch 'main' into add-feature-checkbox
This commit is contained in:
@ -55,8 +55,11 @@ class DartHttpCodeGen {
|
||||
final strContent = CodeExpression(Code('r\'\'\'$body\'\'\''));
|
||||
dataExp = declareVar('body', type: refer('String')).assign(strContent);
|
||||
|
||||
composeHeaders.putIfAbsent(HttpHeaders.contentTypeHeader,
|
||||
final hasContentTypeHeader = composeHeaders.keys.any((k) => k.toLowerCase() == HttpHeaders.contentTypeHeader);
|
||||
if (!hasContentTypeHeader) {
|
||||
composeHeaders.putIfAbsent(HttpHeaders.contentTypeHeader,
|
||||
() => kContentTypeMap[contentType] ?? '');
|
||||
}
|
||||
}
|
||||
|
||||
Expression? queryParamExp;
|
||||
|
Reference in New Issue
Block a user