HttpRequestModel class

Annotations
  • @freezed

Constructors

HttpRequestModel.new({@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})
const
factory
HttpRequestModel.fromJson(Map<String, Object?> json)
factory

Properties

authModel AuthModel?
no setterinherited
body String?
no setterinherited
bodyContentType ContentType
no setterinherited
contentLength int
no setter
copyWith → $HttpRequestModelCopyWith<HttpRequestModel>
Create a copy of HttpRequestModel with the given fields replaced by the non-null parameter values.
no setterinherited
enabledHeaders List<NameValueModel>?
no setter
enabledHeadersMap Map<String, String>
no setter
enabledParams List<NameValueModel>?
no setter
enabledParamsMap Map<String, String>
no setter
formData List<FormDataModel>?
no setterinherited
formDataList List<FormDataModel>
no setter
formDataMapList List<Map<String, String>>
no setter
hasBody bool
no setter
hasContentTypeHeader bool
no setter
hasFileInFormData bool
no setter
hasFormData bool
no setter
hasFormDataContentType bool
no setter
hashCode int
The hash code for this object.
no setterinherited
hasJsonContentType bool
no setter
hasJsonData bool
no setter
hasQuery bool
no setter
hasTextContentType bool
no setter
hasTextData bool
no setter
headers List<NameValueModel>?
no setterinherited
headersMap Map<String, String>
no setter
isHeaderEnabledList List<bool>?
no setterinherited
isParamEnabledList List<bool>?
no setterinherited
method HTTPVerb
no setterinherited
params List<NameValueModel>?
no setterinherited
paramsMap Map<String, String>
no setter
query String?
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url String
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this HttpRequestModel to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited