Enum RequestContext.CurlVerbosity

java.lang.Object
java.lang.Enum<RequestContext.CurlVerbosity>
com.shri.restinpeace.interceptor.RequestContext.CurlVerbosity
All Implemented Interfaces:
Serializable, Comparable<RequestContext.CurlVerbosity>, java.lang.constant.Constable
Enclosing class:
RequestContext

public static enum RequestContext.CurlVerbosity extends Enum<RequestContext.CurlVerbosity>
How much extra diagnostic detail 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 Constants
    Enum Constant
    Description
    No 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 (to curl's own stdout) - useful when VERBOSE'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 info curl itself sees (to curl's own stderr), without touching either body.
    -vv - everything VERBOSE prints, plus a per-line timestamp and a transfer/connection id prefix (e.g.
    -vvv - everything VV prints, plus a raw, hex-offset-prefixed dump of the actual header and body bytes sent and received on the wire (e.g.
    -vvvv - everything VVV prints, plus a full trace of curl'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 it curl's own implementation detail rather than anything about the actual request/response.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • NONE

      public static final RequestContext.CurlVerbosity NONE
      No extra flag - just the method, URL, headers, and body.
    • VERBOSE

      public static final RequestContext.CurlVerbosity VERBOSE
      -v - prints the request/response headers and connection info curl itself sees (to curl's own stderr), without touching either body. Documented, stable curl behavior.
    • VV

      public static final RequestContext.CurlVerbosity VV
      -vv - everything VERBOSE prints, plus a per-line timestamp and a transfer/connection id prefix (e.g. [0-0]) on each line - closer to what TRACE's --trace-time adds, but bundled into -v itself instead of a separate documented flag - see this enum's own class javadoc above for why this is less stable than VERBOSE or TRACE.
    • VVV

      public static final RequestContext.CurlVerbosity VVV
      -vvv - everything VV prints, 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- -v levels to what TRACE shows, but via undocumented behavior instead of a committed flag - see this enum's own class javadoc above.
    • VVVV

      public static final RequestContext.CurlVerbosity VVVV
      -vvvv - everything VVV prints, plus a full trace of curl'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 it curl's own implementation detail rather than anything about the actual request/response. Confirmed this is also the ceiling: a fifth (or further) repeated -v produces byte-identical output to this level, it doesn't keep escalating. See this enum's own class javadoc above for why TRACE is usually the better choice when this much detail is genuinely needed.
    • TRACE

      public static final RequestContext.CurlVerbosity 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 (to curl's own stdout) - useful when VERBOSE'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. Unlike VV/VVV/VVVV, both flags here are documented, stable curl behavior - prefer this level over VVVV when that stability matters, or when curl's own internal engine-state noise isn't wanted alongside the wire-level detail.
  • Method Details

    • values

      public static RequestContext.CurlVerbosity[] 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

      public static RequestContext.CurlVerbosity valueOf(String name)
      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 name
      NullPointerException - if the argument is null