MCPcopy Index your code
hub / github.com/chain/Core / request

Method request

sdk/java/src/main/java/com/chain/http/Client.java:140–148  ·  view source on GitHub ↗

Perform a single HTTP POST request against the API for a specific action. @param action The requested API action @param body Body payload sent to the API as JSON @param tClass Type of object to be deserialized from the response JSON @return the result of the post request @throws ChainException

(String action, Object body, final Type tClass)

Source from the content-addressed store, hash-verified

138 * @throws ChainException
139 */
140 public <T> T request(String action, Object body, final Type tClass) throws ChainException {
141 ResponseCreator<T> rc =
142 new ResponseCreator<T>() {
143 public T create(Response response, Gson deserializer) throws IOException {
144 return deserializer.fromJson(response.body().charStream(), tClass);
145 }
146 };
147 return post(action, body, rc);
148 }
149
150 /**
151 * Perform a single HTTP POST request against the API for a specific action,

Callers 15

interceptMethod · 0.45
logRequestDataMethod · 0.45
getPageMethod · 0.45
getPageMethod · 0.45
getPageMethod · 0.45
createMethod · 0.45
getInfoMethod · 0.45
resetMethod · 0.45
resetEverythingMethod · 0.45
configureMethod · 0.45
createMethod · 0.45
deleteMethod · 0.45

Calls 1

postMethod · 0.95

Tested by

no test coverage detected