commit | 1fbe48d05c8720f95e0c273bb4358094e4075084 | [log] [tgz] |
---|---|---|
author | Sam Davis <sam.davis@tasktop.com> | Wed Jan 14 11:40:41 2015 -0800 |
committer | Alexei Trebounskikh <alexei.trebounskikh@tasktop.com> | Wed Jan 16 17:32:45 2019 -0500 |
tree | 1674c2f3ac72df1d98f210a8f936d18c5328a9fd | |
parent | c2d0ce71e537e25bc28835d6d349e04bbbd075fc [diff] |
457156: allow clients to configure the request after authentication Change-Id: I488764e7be88fcc8b35649177b729c41225ccbec Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=457156
diff --git a/org.eclipse.mylyn.commons.repositories.http.core/src/org/eclipse/mylyn/commons/repositories/http/core/CommonHttpOperation.java b/org.eclipse.mylyn.commons.repositories.http.core/src/org/eclipse/mylyn/commons/repositories/http/core/CommonHttpOperation.java index 015c86c..c71a381 100644 --- a/org.eclipse.mylyn.commons.repositories.http.core/src/org/eclipse/mylyn/commons/repositories/http/core/CommonHttpOperation.java +++ b/org.eclipse.mylyn.commons.repositories.http.core/src/org/eclipse/mylyn/commons/repositories/http/core/CommonHttpOperation.java
@@ -44,6 +44,12 @@ client.authenticate(monitor); } + /** + * Clients may override to configure the request after authentication + */ + protected void configure(HttpRequestBase request) { + } + protected HttpGet createGetRequest(String requestPath) { return new HttpGet(requestPath); } @@ -112,6 +118,7 @@ // force authentication if (needsAuthentication()) { authenticate(monitor); + configure(request); } HttpResponse response = client.execute(request, monitor);