Created
May 16, 2015 15:44
-
-
Save javazquez/7ff57562f257ca6ded09 to your computer and use it in GitHub Desktop.
Basic Auth with Groovy
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
//Here is a quick groovy 1.7.4 Basic Auth Example | |
@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.5.0' ) | |
def authSite = new groovyx.net.http.HTTPBuilder( 'http://10.110.201.115/~juanvazquez/basicAuth/' ) | |
authSite.auth.basic 'test', 'this' | |
println authSite.get( path:'testAuth.html' ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment