MockHttpHeaders class

A class which mocks HttpHeaders.

See the documentation for Mockito's code generation for more information.

Inheritance
Implemented types
Available extensions

Constructors

MockHttpHeaders.new()

Properties

chunkedTransferEncoding bool
Whether the connection uses chunked transfer encoding.
getter/setter pairoverride
contentLength int
The value of the contentLengthHeader header, if any.
getter/setter pairoverride
contentType ContentType?
The ContentType of the contentTypeHeader header, if any.
getter/setter pairinherited-getteroverride-setter
date DateTime?
The date specified by the dateHeader header, if any.
getter/setter pairinherited-getteroverride-setter
expires DateTime?
The date and time specified by the expiresHeader header, if any.
getter/setter pairinherited-getteroverride-setter
hashCode int
The hash code for this object.
no setterinherited
host String?
The value of the hostHeader header, if any.
getter/setter pairinherited-getteroverride-setter
ifModifiedSince DateTime?
The date and time specified by the ifModifiedSinceHeader header, if any.
getter/setter pairinherited-getteroverride-setter
persistentConnection bool
Whether the connection is persistent (keep-alive).
getter/setter pairoverride
port int?
The value of the port part of the hostHeader header, if any.
getter/setter pairinherited-getteroverride-setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(String? name, Object? value, {bool? preserveHeaderCase = false}) → void
Adds a header value.
override
clear() → void
Removes all headers.
override
forEach(void action(String, List<String>)?) → void
Performs the action on each header.
override
noFolding(String? name) → void
Disables folding for the header named name when sending the HTTP header.
override
noSuchMethod(Invocation invocation, {Object? returnValue, Object? returnValueForMissingStub = deferToDefaultResponse}) → dynamic
Handles method stubbing, method call verification, and real method calls.
inherited
remove(String? name, Object? value) → void
Removes a specific value for a header name.
override
removeAll(String? name) → void
Removes all values for the specified header name.
override
set(String? name, Object? value, {bool? preserveHeaderCase = false}) → void
Sets the header name to value.
override
toMap() Map<String, List<String>>

Available on HttpHeaders, provided by the HttpHeaderExtension extension

Converts the HttpHeaders to a Map where the keys are header names and the values are lists of header values.
toString() String
A string representation of this object.
inherited
value(String? name) String?
Convenience method for the value for a single valued header.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](String? name) List<String>?
The values for the header named name.
override