Enum RequestContext.CurlVerbosity
- All Implemented Interfaces:
Serializable,Comparable<RequestContext.CurlVerbosity>,java.lang.constant.Constable
- Enclosing class:
- RequestContext
RequestContext.toCurlCommand(CurlVerbosity)
asks curl itself to print, via curl's own flags - RIP
doesn't invent its own verbosity scheme, it just picks which standard
curl flag(s) to include.
VERBOSE/VV/VVV/VVVV are repeated
-v, in the same shape a consumer might expect from a tool like
ssh - but unlike ssh, this scaling behavior is
not documented in curl's own --help/man page
output (verified against curl 8.22.0, the latest release as
of this writing) - only the plain -v/--verbose flag
itself is. It's real and reproducible (confirmed directly: distinct,
increasing output on the same request for one through four repeated
-vs, identical output from a fifth repeat onward - the level
caps out at four), most likely an internal curl_trc debug
counter that happens to respond to how many times -v was
given, rather than a committed CLI contract - so, unlike TRACE's flags, it could plausibly change or disappear in some
future curl release without notice. Prefer TRACE
over VVVV when that stability matters more than matching
exactly what a person would type by hand while debugging.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNo extra flag - just the method, URL, headers, and body.--trace-ascii - --trace-time- a full, human-readable, per-line-timestamped trace of everything sent and received on the wire, headers and bodies both (tocurl's own stdout) - useful whenVERBOSE's headers-only view isn't enough to explain a failure, or when the timing of one step in the exchange (a slow TLS handshake, a delayed response body) matters as much as its content.-v- prints the request/response headers and connection infocurlitself sees (tocurl's own stderr), without touching either body.-vv- everythingVERBOSEprints, plus a per-line timestamp and a transfer/connection id prefix (e.g.-vvv- everythingVVprints, plus a raw, hex-offset-prefixed dump of the actual header and body bytes sent and received on the wire (e.g.-vvvv- everythingVVVprints, plus a full trace ofcurl's own internal engine state machine (DNS resolution, TCP connect, Happy Eyeballs, connection-pool and multi-handle transitions, internal timers, ...) - by far the noisiest level, most of itcurl's own implementation detail rather than anything about the actual request/response. -
Method Summary
Modifier and TypeMethodDescriptionstatic RequestContext.CurlVerbosityReturns the enum constant of this type with the specified name.static RequestContext.CurlVerbosity[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NONE
No extra flag - just the method, URL, headers, and body. -
VERBOSE
-v- prints the request/response headers and connection infocurlitself sees (tocurl's own stderr), without touching either body. Documented, stablecurlbehavior. -
VV
-vv- everythingVERBOSEprints, plus a per-line timestamp and a transfer/connection id prefix (e.g.[0-0]) on each line - closer to whatTRACE's--trace-timeadds, but bundled into-vitself instead of a separate documented flag - see this enum's own class javadoc above for why this is less stable thanVERBOSEorTRACE. -
VVV
-vvv- everythingVVprints, plus a raw, hex-offset-prefixed dump of the actual header and body bytes sent and received on the wire (e.g.0000: GET / HTTP/1.1) - the closest of the repeated--vlevels to whatTRACEshows, but via undocumented behavior instead of a committed flag - see this enum's own class javadoc above. -
VVVV
-vvvv- everythingVVVprints, plus a full trace ofcurl's own internal engine state machine (DNS resolution, TCP connect, Happy Eyeballs, connection-pool and multi-handle transitions, internal timers, ...) - by far the noisiest level, most of itcurl's own implementation detail rather than anything about the actual request/response. Confirmed this is also the ceiling: a fifth (or further) repeated-vproduces byte-identical output to this level, it doesn't keep escalating. See this enum's own class javadoc above for whyTRACEis usually the better choice when this much detail is genuinely needed. -
TRACE
--trace-ascii - --trace-time- a full, human-readable, per-line-timestamped trace of everything sent and received on the wire, headers and bodies both (tocurl's own stdout) - useful whenVERBOSE's headers-only view isn't enough to explain a failure, or when the timing of one step in the exchange (a slow TLS handshake, a delayed response body) matters as much as its content. UnlikeVV/VVV/VVVV, both flags here are documented, stablecurlbehavior - prefer this level overVVVVwhen that stability matters, or whencurl's own internal engine-state noise isn't wanted alongside the wire-level detail.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-