Top Description Methods
org.apache.hc.core5.http

public Interface HttpRequest

extends HttpMessage
Known Direct Subinterfaces
org.apache.hc.core5.http.ClassicHttpRequest
Known Direct Implementers
org.apache.hc.core5.http.message.BasicHttpRequest, org.apache.hc.core5.http.message.HttpRequestWrapper
Imports
java.net.URI, .URISyntaxException, org.apache.hc.core5.net.URIAuthority

A request message from a client to a server includes, within the first line of that message, the method to be applied to the resource, the identifier of the resource, and the protocol version in use.
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public URIAuthority

Returns:

the authority or null.
getAuthority
()

Returns authority of this request message.

public String

Returns:

the request method.
getMethod
()

Returns method of this request message.

public String

Returns:

the request URI or null.
getPath
()

Returns URI path of this request message or null if not set.

public String

Returns:

the request URI.
getRequestUri
()

Returns request URI of this request message.

public String

Returns:

the scheme or null.
getScheme
()

Returns scheme of this request message.

public URI

Returns:

the request URI.
getUri
()

Returns full request URI of this request message.

public void
setAuthority(URIAuthority authority)

Sets authority of this request message.

public void
setPath(String path)

Sets URI path of this request message.

public void
setScheme(String scheme)

Sets scheme of this request message.

public void
setUri(final URI
the request URI.
requestUri
)

Sets the full request URI of this request message.

Inherited from org.apache.hc.core5.http.HttpMessage:
addHeaderaddHeadergetVersionremoveHeaderremoveHeaderssetHeadersetHeadersetHeaderssetVersion

Method Detail

getAuthorityback to summary
public URIAuthority getAuthority()

Returns authority of this request message.

Returns:URIAuthority

the authority or null.

Since
5.0
getMethodback to summary
public String getMethod()

Returns method of this request message.

Returns:String

the request method.

getPathback to summary
public String getPath()

Returns URI path of this request message or null if not set.

Returns:String

the request URI or null.

getRequestUriback to summary
public String getRequestUri()

Returns request URI of this request message. It may be an absolute or relative URI. Applicable to HTTP/1.1 version or earlier.

Returns:String

the request URI.

Since
5.0
getSchemeback to summary
public String getScheme()

Returns scheme of this request message.

Returns:String

the scheme or null.

Since
5.0
getUriback to summary
public URI getUri() throws URISyntaxException

Returns full request URI of this request message.

Returns:URI

the request URI.

Since
5.0
setAuthorityback to summary
public void setAuthority(URIAuthority authority)

Sets authority of this request message.

Since
5.0
setPathback to summary
public void setPath(String path)

Sets URI path of this request message.

Since
5.0
setSchemeback to summary
public void setScheme(String scheme)

Sets scheme of this request message.

Since
5.0
setUriback to summary
public void setUri(final URI requestUri)

Sets the full request URI of this request message.

Parameters
requestUri:URI

the request URI.

Since
5.0