HttpRequestModel constructor
const
HttpRequestModel({
- @Default.new(HTTPVerb.get) HTTPVerb method,
- @Default.new("") String url,
- List<
NameValueModel> ? headers, - List<
NameValueModel> ? params, - @Default.new(AuthModel(type: APIAuthType.none)) AuthModel? authModel,
- List<
bool> ? isHeaderEnabledList, - List<
bool> ? isParamEnabledList, - @Default.new(ContentType.json) ContentType bodyContentType,
- String? body,
- String? query,
- List<
FormDataModel> ? formData,
Implementation
@JsonSerializable(explicitToJson: true, anyMap: true)
const factory HttpRequestModel({
@Default(HTTPVerb.get) HTTPVerb method,
@Default("") String url,
List<NameValueModel>? headers,
List<NameValueModel>? params,
@Default(AuthModel(type: APIAuthType.none)) AuthModel? authModel,
List<bool>? isHeaderEnabledList,
List<bool>? isParamEnabledList,
@Default(ContentType.json) ContentType bodyContentType,
String? body,
String? query,
List<FormDataModel>? formData,
}) = _HttpRequestModel;