public class

ServletServerHttpRequest

extends Object
implements ServerHttpRequest
java.lang.Object
   ↳ org.springframework.http.server.ServletServerHttpRequest

Class Overview

ServerHttpRequest implementation that is based on a HttpServletRequest.

Summary

Public Constructors
ServletServerHttpRequest(HttpServletRequest servletRequest)
Construct a new instance of the ServletServerHttpRequest based on the given HttpServletRequest
Public Methods
InputStream getBody()
Return the body of the message as an input stream.
HttpHeaders getHeaders()
Return the headers of this message.
HttpMethod getMethod()
Return the HTTP method of the request.
URI getURI()
Return the URI of the request.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.http.HttpInputMessage
From interface org.springframework.http.HttpMessage
From interface org.springframework.http.HttpRequest

Public Constructors

public ServletServerHttpRequest (HttpServletRequest servletRequest)

Construct a new instance of the ServletServerHttpRequest based on the given HttpServletRequest

Parameters
servletRequest the HttpServletRequest

Public Methods

public InputStream getBody ()

Return the body of the message as an input stream.

Returns
  • the input stream body
Throws
IOException

public HttpHeaders getHeaders ()

Return the headers of this message.

Returns
  • a corresponding HttpHeaders object

public HttpMethod getMethod ()

Return the HTTP method of the request.

Returns
  • the HTTP method as an HttpMethod enum value

public URI getURI ()

Return the URI of the request.

Returns
  • the URI of the request