コード例 #1
0
 @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;
   }
 }
コード例 #2
0
 @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;
   }
 }