Record Class Http1RequestLine
java.lang.Object
java.lang.Record
cool.scx.http.x.http1.request_line.Http1RequestLine
- Record Components:
method-requestTarget-version-
public record Http1RequestLine(ScxHttpMethod method, ScxURI requestTarget, HttpVersion version)
extends Record
Http 1.x 的请求行
- Version:
- 0.0.1
- Author:
- scx567888
-
Constructor Summary
ConstructorsConstructorDescriptionHttp1RequestLine(ScxHttpMethod method, ScxURI path) Http1RequestLine(ScxHttpMethod method, ScxURI requestTarget, HttpVersion version) Creates an instance of aHttp1RequestLinerecord class. -
Method Summary
Modifier and TypeMethodDescriptionencode()encode(RequestTargetForm requestTargetForm) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.method()Returns the value of themethodrecord component.static Http1RequestLineReturns the value of therequestTargetrecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Constructor Details
-
Http1RequestLine
-
Http1RequestLine
Creates an instance of aHttp1RequestLinerecord class.- Parameters:
method- the value for themethodrecord componentrequestTarget- the value for therequestTargetrecord componentversion- the value for theversionrecord component
-
-
Method Details
-
of
public static Http1RequestLine of(String requestLineStr) throws InvalidHttpRequestLineException, InvalidHttpVersion -
encode
-
encode
-
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). -
method
-
requestTarget
Returns the value of therequestTargetrecord component.- Returns:
- the value of the
requestTargetrecord component
-
version
-