java.lang.Object
com.jpro.webapi.server.Request
Represents a request with properties such as path, URI, host, and method.
This is an abstract class that provides a blueprint for request implementations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract byte[]
getBody()
Returns the body of the request.Returns the headers of the request.abstract String
getHost()
Returns the host of the request.abstract String
Returns the method of the request.abstract String
getPath()
Returns the path of the request.abstract String
getURI()
Returns the URI of the request.toString()
-
Constructor Details
-
Request
public Request()
-
-
Method Details
-
getPath
Returns the path of the request. The path typically represents the endpoint or resource requested.- Returns:
- the path of the request
-
getURI
Returns the URI of the request. The URI typically includes the scheme, host, and path.- Returns:
- the URI of the request
-
getHost
Returns the host of the request. The host typically represents the domain or IP address of the server.- Returns:
- the host of the request
-
getMethod
Returns the method of the request. The method typically represents the HTTP method used (e.g., GET, POST, etc.).- Returns:
- the method of the request
-
getHeaders
Returns the headers of the request.- Returns:
- an unmodifiable map from header name to list of values
-
getBody
public abstract byte[] getBody()Returns the body of the request.- Returns:
- the body of the request as a byte array
-
toString
-