mirror of
https://github.com/foss42/apidash.git
synced 2025-06-06 11:28:07 +08:00
Refactor codegen
This commit is contained in:
@ -75,7 +75,6 @@ import okhttp3.MultipartBody""";
|
||||
|
||||
String? getCode(
|
||||
RequestModel requestModel,
|
||||
String defaultUriScheme,
|
||||
) {
|
||||
try {
|
||||
String result = "";
|
||||
@ -83,13 +82,8 @@ import okhttp3.MultipartBody""";
|
||||
bool hasBody = false;
|
||||
bool hasFormData = false;
|
||||
|
||||
String url = requestModel.url;
|
||||
if (!url.contains("://") && url.isNotEmpty) {
|
||||
url = "$defaultUriScheme://$url";
|
||||
}
|
||||
|
||||
var rec = getValidRequestUri(
|
||||
url,
|
||||
requestModel.url,
|
||||
requestModel.enabledRequestParams,
|
||||
);
|
||||
Uri? uri = rec.$1;
|
||||
|
Reference in New Issue
Block a user