mirror of
https://github.com/foss42/apidash.git
synced 2025-05-22 08:46:33 +08:00
23 lines
502 B
Dart
23 lines
502 B
Dart
import 'package:apidash_core/apidash_core.dart';
|
|
import '../../utils/utils.dart';
|
|
|
|
class HARCodeGen {
|
|
String? getCode(
|
|
HttpRequestModel requestModel,
|
|
String defaultUriScheme, {
|
|
String? boundary,
|
|
}) {
|
|
try {
|
|
var harString = kJsonEncoder.convert(requestModelToHARJsonRequest(
|
|
requestModel,
|
|
defaultUriScheme: defaultUriScheme,
|
|
useEnabled: true,
|
|
boundary: boundary,
|
|
));
|
|
return harString;
|
|
} catch (e) {
|
|
return null;
|
|
}
|
|
}
|
|
}
|