mirror of
https://github.com/foss42/apidash.git
synced 2025-10-17 03:33:07 +08:00
Use enums instead of constants
This commit is contained in:
@ -226,6 +226,7 @@ const kMethodsWithBody = [
|
||||
HTTPVerb.patch,
|
||||
HTTPVerb.delete,
|
||||
];
|
||||
|
||||
const kDefaultHttpMethod = HTTPVerb.get;
|
||||
const kDefaultContentType = ContentType.json;
|
||||
|
||||
|
@ -8,14 +8,14 @@ import 'response_model.dart';
|
||||
class RequestModel {
|
||||
const RequestModel({
|
||||
required this.id,
|
||||
this.method = kDefaultHttpMethod,
|
||||
this.method = HTTPVerb.get,
|
||||
this.url = "",
|
||||
this.name = "",
|
||||
this.description = "",
|
||||
this.requestTabIndex = 0,
|
||||
this.requestHeaders,
|
||||
this.requestParams,
|
||||
this.requestBodyContentType = kDefaultContentType,
|
||||
this.requestBodyContentType = ContentType.json,
|
||||
this.requestBody,
|
||||
this.responseStatus,
|
||||
this.message,
|
||||
|
Reference in New Issue
Block a user