Record Class HttpRequestImpl
java.lang.Object
java.lang.Record
net.uiqui.embedhttp.api.impl.HttpRequestImpl
- All Implemented Interfaces:
HttpRequest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.getBody()
Gets the body of the request.Gets the headers of the request.Gets the HTTP method of the request.getPath()
Gets the path of the request (excluding query parameters).Gets the query parameters from the URL.getURL()
Gets the full URL of the request.final int
hashCode()
Returns a hash code value for this object.Returns the value of thepathParameters
record component.request()
Returns the value of therequest
record component.route()
Returns the value of theroute
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
HttpRequestImpl
Creates an instance of aHttpRequestImpl
record class.- Parameters:
request
- the value for therequest
record componentroute
- the value for theroute
record componentpathParameters
- the value for thepathParameters
record component
-
-
Method Details
-
getMethod
Description copied from interface:HttpRequest
Gets the HTTP method of the request.- Specified by:
getMethod
in interfaceHttpRequest
- Returns:
- the HTTP method
-
getURL
Description copied from interface:HttpRequest
Gets the full URL of the request.- Specified by:
getURL
in interfaceHttpRequest
- Returns:
- the URL as a string
-
getPath
Description copied from interface:HttpRequest
Gets the path of the request (excluding query parameters).- Specified by:
getPath
in interfaceHttpRequest
- Returns:
- the path as a string
-
getQueryParameters
Description copied from interface:HttpRequest
Gets the query parameters from the URL.- Specified by:
getQueryParameters
in interfaceHttpRequest
- Returns:
- a map of query parameter names to their values
-
getHeaders
Description copied from interface:HttpRequest
Gets the headers of the request.- Specified by:
getHeaders
in interfaceHttpRequest
- Returns:
- a map of header names to their values
-
getBody
Description copied from interface:HttpRequest
Gets the body of the request.- Specified by:
getBody
in interfaceHttpRequest
- Returns:
- the body as a string
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
request
Returns the value of therequest
record component.- Returns:
- the value of the
request
record component
-
route
Returns the value of theroute
record component.- Returns:
- the value of the
route
record component
-
pathParameters
Returns the value of thepathParameters
record component.- Specified by:
pathParameters
in interfaceHttpRequest
- Returns:
- the value of the
pathParameters
record component
-