Package org.onyx.http
Class Client
java.lang.Object
org.onyx.http.Client
The Client object encapsulates access to the ledger API server.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for creating client objects -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the credential (possibly null).booleanOverridesObject.equals(Object)inthashCode()OverridesObject.hashCode()<HelloReponse>
voidhello()<T> TPerform a single HTTP POST request against the API for a specific action.
-
Constructor Details
-
Client
- Throws:
ConfigurationException
-
-
Method Details
-
hello
- Throws:
ChainException
-
request
Perform a single HTTP POST request against the API for a specific action.- Parameters:
action- The requested API actionbody- Body payload sent to the API as JSONtClass- Type of object to be deserialized from the response JSON- Returns:
- the result of the post request
- Throws:
ChainException
-
credential
Returns the credential (possibly null).- Returns:
- the credential
-
hashCode
public int hashCode()OverridesObject.hashCode() -
equals
OverridesObject.equals(Object)
-