Console class
Rendering one exchange for a human at a terminal - presentation only, and
everything shown passes through the redactor first. What is printed is also
put through encodeForConsole, so a rune the console cannot carry is shown
as its escape instead of being substituted.
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
-
buildCurl(
ApiResponse< Object?> response, Object? reportedBody, SdkConfig config, {Map<String, Object?> ? files, bool formEncoded = false}) → String - A copy-pasteable curl reproducing the call, for a POSIX shell, with every fragment single-quoted and headers already redacted.
-
buildCurlForRequest(
RequestInfo info, Object? payload, SdkConfig config, {Map< String, Object?> ? files, bool formEncoded = false}) → String - The same curl line built from the request record alone, so a call that never produced a response is still reproducible.
-
renderExchange(
ApiResponse< Object?> response, Object? reportedBody, SdkConfig config, {Map<String, Object?> ? files, bool formEncoded = false, ConsoleEncodingProbe? canEncode}) → String -
The text to print for one exchange, per the config's print flags; a failed
v4 call also names its
request_id. -
renderFailure(
RequestInfo info, Object? reportedBody, SdkConfig config, {Map< String, Object?> ? files, bool formEncoded = false, ConsoleEncodingProbe? canEncode}) → String - The text to print for a send that never produced a response - a connection failure or a timeout.
-
renderJsonValue(
Object? value, {bool compact = false}) → String -
Render one already-redacted value for display:
nullis<empty>, bytes are<N bytes>, text is itself, anything else is JSON. -
summarisePayload(
Object? body, Map< String, Object?> ? files) → Object? - Describe what was sent without reading a byte of any upload; a form part stays a structure, so its secrets still meet the redactor.
Constants
- noResponseStatus → const String
- Shown where a status code would go for a request that never reached one - text, so it cannot be mistaken for a code the server sent.