HttpClientUtils class
Utils class which helps calculating values for web request monitoring
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
calcRequestFirstLineLength(
String method, String path, String query) → int -
Calculation of the first line which appears in a request. This is mainly influenced
by the
method
,path
andquery
of the URL. -
calcRequestSizeBytes(
BaseRequest request, Map< String, String> additionalRequestHeaders) → int - Calculation the bytes of a request depending on the request options.
-
calcResponseSizeBytes(
StreamedResponse response) → int -
Calculate the response size depending on body of the
response
. As the content is stream, it can't be consumed twice, which means we need a content-length header to actually calculate the real response size bytes. -
generateSpanId(
) → String - @returns a random span id (16 character hex string).
-
generateTraceId(
) → String - @returns a random trace id (32 character hex string).
-
getHeaderLength(
Map< String, String> headers) → int -
Calculating the length of the used
headers
.