public static enum HttpLoggingInterceptor.Level extends java.lang.Enum<HttpLoggingInterceptor.Level>
枚举常量和说明 |
---|
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.
|
限定符和类型 | 方法和说明 |
---|---|
static HttpLoggingInterceptor.Level |
valueOf(java.lang.String name)
返回带有指定名称的该类型的枚举常量。
|
static HttpLoggingInterceptor.Level[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
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
- 要返回的枚举常量的名称。java.lang.IllegalArgumentException
- 如果该枚举类型没有带有指定名称的常量java.lang.NullPointerException
- 如果参数为空值