Created
October 19, 2015 16:07
-
-
Save gregturn/5baf2cbc3c112746f38f to your computer and use it in GitHub Desktop.
What is REALLY takes to feed authorization through Groovy.
This file contains hidden or 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
| URL url = path.toURL() | |
| URLConnection urlConnection = url.openConnection() | |
| if (url.userInfo != null) { | |
| urlConnection.setRequestProperty(HttpHeaders.AUTHORIZATION, "Basic ${new Base64().encode(url.userInfo.bytes)}") | |
| } | |
| client.uploadApplication(description.application, description.targetPackage.package, urlConnection.inputStream) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment