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)
| 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. |
no test coverage detected