camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [3/3] camel git commit: Fix request URL
Date Sun, 04 Dec 2016 14:33:03 GMT
Fix request URL


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/fb900ab6
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/fb900ab6
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/fb900ab6

Branch: refs/heads/camel-2.17.x
Commit: fb900ab6b14ade8f8046fc441f9779373c4f98a1
Parents: f5c94cd
Author: Hans Peter Jensen <ex0730@almbrand.dk>
Authored: Thu Dec 1 17:31:44 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sun Dec 4 15:32:49 2016 +0100

----------------------------------------------------------------------
 .../salesforce/internal/client/DefaultBulkApiClient.java  | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/fb900ab6/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultBulkApiClient.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultBulkApiClient.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultBulkApiClient.java
index 1f024db..565006a 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultBulkApiClient.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultBulkApiClient.java
@@ -259,7 +259,7 @@ public class DefaultBulkApiClient extends AbstractClientBase implements
BulkApiC
 
     @Override
     public void getRequest(String jobId, String batchId, final StreamResponseCallback callback)
{
-        final Request get = getRequest(HttpMethod.GET, batchUrl(jobId, batchId));
+        final Request get = getRequest(HttpMethod.GET, batchRequestUrl(jobId, batchId, null));
 
         // make the call and parse the result
         doHttpRequest(get, new ClientResponseCallback() {
@@ -472,4 +472,12 @@ public class DefaultBulkApiClient extends AbstractClientBase implements
BulkApiC
             return batchUrl(jobId, batchId) + "/result";
         }
     }
+
+    private String batchRequestUrl(String jobId, String batchId, String requestId) {
+        if (requestId != null) {
+            return batchUrl(jobId, batchId) + "/request/" + requestId;
+        } else {
+            return batchUrl(jobId, batchId) + "/request";
+        }
+    }
 }


Mime
View raw message