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 booleanIndicates 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 inthashCode()Returns a hash code value for this object.Returns the value of thepathParametersrecord component.request()Returns the value of therequestrecord component.route()Returns the value of therouterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HttpRequestImpl
Creates an instance of aHttpRequestImplrecord class.- Parameters:
request- the value for therequestrecord componentroute- the value for therouterecord componentpathParameters- the value for thepathParametersrecord component
-
-
Method Details
-
getMethod
Description copied from interface:HttpRequestGets the HTTP method of the request.- Specified by:
getMethodin interfaceHttpRequest- Returns:
- the HTTP method
-
getURL
Description copied from interface:HttpRequestGets the full URL of the request.- Specified by:
getURLin interfaceHttpRequest- Returns:
- the URL as a string
-
getPath
Description copied from interface:HttpRequestGets the path of the request (excluding query parameters).- Specified by:
getPathin interfaceHttpRequest- Returns:
- the path as a string
-
getQueryParameters
Description copied from interface:HttpRequestGets the query parameters from the URL.- Specified by:
getQueryParametersin interfaceHttpRequest- Returns:
- a map of query parameter names to their values
-
getHeaders
Description copied from interface:HttpRequestGets the headers of the request.- Specified by:
getHeadersin interfaceHttpRequest- Returns:
- a map of header names to their values
-
getBody
Description copied from interface:HttpRequestGets the body of the request.- Specified by:
getBodyin 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 therequestrecord component.- Returns:
- the value of the
requestrecord component
-
route
Returns the value of therouterecord component.- Returns:
- the value of the
routerecord component
-
pathParameters
Returns the value of thepathParametersrecord component.- Specified by:
pathParametersin interfaceHttpRequest- Returns:
- the value of the
pathParametersrecord component
-