Top Description Fields Methods
org.springframework.web.multipart

public Interface MultipartHttpServletRequest

extends HttpServletRequest, MultipartRequest
Known Direct Implementers
org.springframework.web.multipart.support.AbstractMultipartHttpServletRequest
Imports
jakarta.servlet.http.HttpServletRequest, org.springframework.http.HttpHeaders, .HttpMethod, org.springframework.lang.Nullable

Provides additional methods for dealing with multipart content within a servlet request, allowing to access uploaded files.

Implementations also need to override the standard jakarta.servlet.ServletRequest methods for parameter access, making multipart parameters available.

A concrete implementation is org.springframework.web.multipart.support.DefaultMultipartHttpServletRequest. As an intermediate step, org.springframework.web.multipart.support.AbstractMultipartHttpServletRequest can be subclassed.

Authors
Juergen Hoeller, Trevor D. Cook
Since
29.09.2003
See Also
MultipartResolver, MultipartFile, jakarta.servlet.http.HttpServletRequest#getParameter, jakarta.servlet.http.HttpServletRequest#getParameterNames, jakarta.servlet.http.HttpServletRequest#getParameterMap, org.springframework.web.multipart.support.DefaultMultipartHttpServletRequest, org.springframework.web.multipart.support.AbstractMultipartHttpServletRequest

Field Summary

Inherited from jakarta.servlet.http.HttpServletRequest:
BASIC_AUTHCLIENT_CERT_AUTHDIGEST_AUTHFORM_AUTH

Method Summary

Modifier and TypeMethod and Description
public HttpHeaders
getMultipartHeaders(String paramOrFileName)

Return the headers for the specified part of the multipart request.

public HttpHeaders
getRequestHeaders()

Return this request's headers as a convenient HttpHeaders instance.

public HttpMethod
getRequestMethod()

Return this request's method as a convenient HttpMethod instance.

Inherited from jakarta.servlet.http.HttpServletRequest:
authenticatechangeSessionIdgetAuthTypegetContextPathgetCookiesgetDateHeadergetHeadergetHeaderNamesgetHeadersgetHttpServletMappinggetIntHeadergetMethodgetPartgetPartsgetPathInfogetPathTranslatedgetQueryStringgetRemoteUsergetRequestedSessionIdgetRequestURIgetRequestURLgetServletPathgetSessiongetSessiongetTrailerFieldsgetUserPrincipalisRequestedSessionIdFromCookieisRequestedSessionIdFromURLisRequestedSessionIdValidisTrailerFieldsReadyisUserInRoleloginlogoutnewPushBuilderupgrade
Inherited from org.springframework.web.multipart.MultipartRequest:
getFilegetFileMapgetFileNamesgetFilesgetMultiFileMapgetMultipartContentType

Method Detail

getMultipartHeadersback to summary
public HttpHeaders getMultipartHeaders(String paramOrFileName)

Return the headers for the specified part of the multipart request.

If the underlying implementation supports access to part headers, then all headers are returned. Otherwise, e.g. for a file upload, the returned headers may expose a 'Content-Type' if available.

Annotations
@Nullable
getRequestHeadersback to summary
public HttpHeaders getRequestHeaders()

Return this request's headers as a convenient HttpHeaders instance.

getRequestMethodback to summary
public HttpMethod getRequestMethod()

Return this request's method as a convenient HttpMethod instance.