HttpRequestModel constructor

  1. @JsonSerializable(explicitToJson: true, anyMap: true)
const HttpRequestModel({
  1. @Default(HTTPVerb.get) HTTPVerb method,
  2. @Default("") String url,
  3. List<NameValueModel>? headers,
  4. List<NameValueModel>? params,
  5. @Default(AuthModel(type: APIAuthType.none)) AuthModel? authModel,
  6. List<bool>? isHeaderEnabledList,
  7. List<bool>? isParamEnabledList,
  8. @Default(ContentType.json) ContentType bodyContentType,
  9. String? body,
  10. String? query,
  11. 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;