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

Method batchRequest

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

Perform a single HTTP POST request against the API for a specific action. Use this method if you want batch semantics, i.e., the endpoint response is an array of valid objects interleaved with arrays, once corresponding to each input object. @param action The requested API action @param body Body p

(
      String action, Object body, final Type tClass, final Type eClass)

Source from the content-addressed store, hash-verified

179 * @throws ChainException
180 */
181 public <T> BatchResponse<T> batchRequest(
182 String action, Object body, final Type tClass, final Type eClass) throws ChainException {
183 ResponseCreator<BatchResponse<T>> rc =
184 new ResponseCreator<BatchResponse<T>>() {
185 public BatchResponse<T> create(Response response, Gson deserializer)
186 throws ChainException, IOException {
187 return new BatchResponse<>(response, deserializer, tClass, eClass);
188 }
189 };
190 return post(action, body, rc);
191 }
192
193 /**
194 * Perform a single HTTP POST request against the API for a specific action.

Callers 10

signBatchMethod · 0.95
createBatchMethod · 0.80
updateTagsBatchMethod · 0.80
buildBatchMethod · 0.80
submitBatchMethod · 0.80
createBatchMethod · 0.80
updateTagsBatchMethod · 0.80
createReceiverBatchMethod · 0.80
accountsAPIFunction · 0.80
assetsAPIFunction · 0.80

Calls 1

postMethod · 0.95

Tested by

no test coverage detected