Package co.cryptoservice.sdk
Record Class ResponseInfo
java.lang.Object
java.lang.Record
co.cryptoservice.sdk.ResponseInfo
- Record Components:
method- the HTTP methodpath- the path below the base URLstatus- the HTTP statusheaders- the response headers (for exampleX-Tenant-RateLimit-Remaining)attempt- the attempt that got this response, from 1
public record ResponseInfo(String method, String path, int status, HttpHeaders headers, int attempt)
extends Record
What a
ResponseListener learns about one HTTP response: never a body.-
Constructor Summary
ConstructorsConstructorDescriptionResponseInfo(String method, String path, int status, HttpHeaders headers, int attempt) Creates an instance of aResponseInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionintattempt()Returns the value of theattemptrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.headers()Returns the value of theheadersrecord component.TheContent-Typewithout parameters, lower-cased.method()Returns the value of themethodrecord component.path()Returns the value of thepathrecord component.intstatus()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResponseInfo
Creates an instance of aResponseInforecord class.
-
-
Method Details
-
mediaType
TheContent-Typewithout parameters, lower-cased.- Returns:
- for example
application/problem+json, or empty when there is none
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
method
Returns the value of themethodrecord component.- Returns:
- the value of the
methodrecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
status
public int status()Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
headers
Returns the value of theheadersrecord component.- Returns:
- the value of the
headersrecord component
-
attempt
public int attempt()Returns the value of theattemptrecord component.- Returns:
- the value of the
attemptrecord component
-