mirror of
https://github.com/foss42/apidash.git
synced 2025-05-29 04:50:36 +08:00
Update curl_parser
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
import 'package:apidash_core/apidash_core.dart';
|
||||
import 'package:args/args.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:seed/seed.dart';
|
||||
import '../utils/string.dart';
|
||||
|
||||
const kHeaderContentType = "Content-Type";
|
||||
|
||||
/// A representation of a cURL command in Dart.
|
||||
///
|
||||
/// The Curl class provides methods for parsing a cURL command string
|
||||
@ -164,7 +166,10 @@ class Curl extends Equatable {
|
||||
formData.add(formDataModel);
|
||||
}
|
||||
headers ??= <String, String>{};
|
||||
headers[kHeaderContentType] = ContentType.formdata.header;
|
||||
if (!(headers.containsKey(kHeaderContentType) ||
|
||||
headers.containsKey(kHeaderContentType.toLowerCase()))) {
|
||||
headers[kHeaderContentType] = "multipart/form-data";
|
||||
}
|
||||
}
|
||||
|
||||
// Handle URL and query parameters
|
||||
|
Reference in New Issue
Block a user