Created
January 10, 2016 22:07
-
-
Save genericpenguin/7f3b5edafecfb335ac16 to your computer and use it in GitHub Desktop.
Error trying to add request interceptor to HTTPClient object in HTTPBuilder from Groovy postbuild plugin within an enclosing class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jira = new HTTPBuilder( url ) | |
jira.client.addRequestInterceptor( new HttpRequestInterceptor() { | |
void process( HttpRequest httpRequest, HttpContext httpContext ) { | |
httpRequest.addHeader( 'Authorization', 'Basic ' + | |
"$username:$password".bytes.encodeBase64().toString() ) | |
} | |
}) | |
/* Error caused by code above | |
No signature of method: org.apache.http.impl.client.DefaultHttpClient.addRequestInterceptor() | |
is applicable for argument types: | |
(com.bigworldtech.ci.JiraConnection$1) values: [com.bigworldtech.ci.JiraConnection$1@343bc096] | |
21:39:20 Possible solutions: addRequestInterceptor(org.apache.http.HttpRequestInterceptor), | |
addRequestInterceptor(org.apache.http.HttpRequestInterceptor, int), getRequestInterceptor(int) | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment