Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ public void onResponse(Call call, Response response) {
try (ResponseBody responseBody = response.body()) {
// Add response to corresponding index
parallelCallHandler.set(
(Integer) call.request().tag(), new HttpResponse(response, responseBody));
Integer.parseInt(call.request().header("request-index")),
new HttpResponse(response, responseBody));
} catch (Exception e) {
throw new TectonServiceException(e.getMessage());
} finally {
Expand Down Expand Up @@ -183,7 +184,7 @@ public Request buildRequestWithDefaultHeaders(HttpRequest httpRequest, int index
okhttp3.MediaType mediaType = okhttp3.MediaType.parse(MediaType.APPLICATION_JSON.getName());
RequestBody requestBody = RequestBody.create(httpRequest.getJsonBody(), mediaType);
requestBuilder.post(requestBody);
requestBuilder.tag(index);
requestBuilder.header("request-index", String.valueOf(index));
return requestBuilder.build();
}

Expand Down