@Override public void sendBatch(String batchUrl, List<FileInfo> batch, long batchSize, String... args) throws IOException { long startTimeUsec = getCurrentTimeUsec(); try { connection.post(batchUrl, batch, args); registerHttpRequestForLogging(batchUrl, 200, startTimeUsec, batchSize); } catch (HttpIoException e) { registerHttpRequestForLogging(batchUrl, e.getResponseCode(), startTimeUsec, batchSize); throw e; } }
@Override public String send(String url, String payload, String... args) throws IOException { long startTimeUsec = getCurrentTimeUsec(); try { String result = connection.post(url, payload, args); registerHttpRequestForLogging(url, 200, startTimeUsec, payload.length()); return result; } catch (HttpIoException e) { registerHttpRequestForLogging(url, e.getResponseCode(), startTimeUsec, payload.length()); throw e; } }