public class RequestInterceptor
extends java.lang.Object
GlobalConfigModule.Builder#printHttpLogLevel(Level) 控制或关闭日志
Created by JessYan on 7/1/2016. Contact me Follow me ================================================
| Modifier and Type | Class and Description |
|---|---|
static class |
RequestInterceptor.Level |
| Constructor and Description |
|---|
RequestInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
convertCharset(java.nio.charset.Charset charset) |
Response |
intercept(Chain chain) |
static boolean |
isForm(MediaType mediaType) |
static boolean |
isHtml(MediaType mediaType) |
static boolean |
isJson(MediaType mediaType) |
static boolean |
isParseable(MediaType mediaType)
是否可以解析
|
static boolean |
isPlain(MediaType mediaType) |
static boolean |
isText(MediaType mediaType) |
static boolean |
isXml(MediaType mediaType) |
static java.lang.String |
parseParams(Request request)
解析请求服务器的请求参数
|
public Response intercept(Chain chain)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String parseParams(Request request)
throws java.io.UnsupportedEncodingException
request - Requestjava.io.UnsupportedEncodingExceptionpublic static boolean isParseable(MediaType mediaType)
mediaType - MediaTypetrue 为可以解析public static boolean isText(MediaType mediaType)
public static boolean isPlain(MediaType mediaType)
public static boolean isJson(MediaType mediaType)
public static boolean isXml(MediaType mediaType)
public static boolean isHtml(MediaType mediaType)
public static boolean isForm(MediaType mediaType)
public static java.lang.String convertCharset(java.nio.charset.Charset charset)