public static enum HttpLoggingInterceptor.Level extends java.lang.Enum<HttpLoggingInterceptor.Level>
Enum Constant and Description |
---|
BASIC
Logs request and response lines.
|
BODY
Logs request and response lines and their respective headers and bodies (if present).
|
HEADERS
Logs request and response lines and their respective headers.
|
NONE
No logs.
|
Modifier and Type | Method and Description |
---|---|
static HttpLoggingInterceptor.Level |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static HttpLoggingInterceptor.Level[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HttpLoggingInterceptor.Level NONE
public static final HttpLoggingInterceptor.Level BASIC
Example:
--> POST /greeting http/1.1 (3-byte body)
<-- 200 OK (22ms, 6-byte body)
public static final HttpLoggingInterceptor.Level HEADERS
Example:
--> POST /greeting http/1.1
Host: example.com
Content-Type: plain/text
Content-Length: 3
--> END POST
<-- 200 OK (22ms)
Content-Type: plain/text
Content-Length: 6
<-- END HTTP
public static final HttpLoggingInterceptor.Level BODY
Example:
--> POST /greeting http/1.1
Host: example.com
Content-Type: plain/text
Content-Length: 3
Hi?
--> END POST
<-- 200 OK (22ms)
Content-Type: plain/text
Content-Length: 6
Hello!
<-- END HTTP
public static HttpLoggingInterceptor.Level[] values()
for (HttpLoggingInterceptor.Level c : HttpLoggingInterceptor.Level.values()) System.out.println(c);
public static HttpLoggingInterceptor.Level valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullCopyright © 2019. All Rights Reserved.