public class RequestWrapper
extends javax.servlet.http.HttpServletRequestWrapper
| 构造器和说明 |
|---|
RequestWrapper(javax.servlet.http.HttpServletRequest request)
Constructs a request object wrapping the given request.
|
RequestWrapper(javax.servlet.http.HttpServletRequest request,
String requestBody) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getHeader(String name) |
javax.servlet.ServletInputStream |
getInputStream() |
BufferedReader |
getReader() |
String |
getRequestBody()
获取JSON请求消息
|
authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getDateHeader, getHeaderNames, getHeaders, getHttpServletMapping, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getTrailerFields, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isTrailerFieldsReady, isUserInRole, login, logout, newPushBuilder, upgradegetAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, removeAttribute, setAttribute, setCharacterEncoding, setRequest, startAsync, startAsyncclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsyncpublic RequestWrapper(javax.servlet.http.HttpServletRequest request)
throws IOException
request - The request to wrapIllegalArgumentException - if the request is nullIOExceptionpublic RequestWrapper(javax.servlet.http.HttpServletRequest request,
String requestBody)
public BufferedReader getReader() throws IOException
getReader 在接口中 javax.servlet.ServletRequestgetReader 在类中 javax.servlet.ServletRequestWrapperIOExceptionpublic String getRequestBody() throws IOException
IOExceptionpublic javax.servlet.ServletInputStream getInputStream()
throws IOException
getInputStream 在接口中 javax.servlet.ServletRequestgetInputStream 在类中 javax.servlet.ServletRequestWrapperIOExceptionCopyright © 2022. All rights reserved.