We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Since basic auth is quite well-known, I'd suggest to have a helper method like before:
def setup() { gru.basicAuth('some-username', 'some-password') }
Currently I implement it using an extension method:
static TestDefinitionBuilder basicAuth(TestDefinitionBuilder self, String username, String password) { return self.command(HttpMinion) { def cred = "$username:$password".bytes.encodeBase64().toString() requestHeaders.put('Authorization', ['Basic ' + cred]) } }
A small improvement, but I'd say it's worth it. LMK if you need a PR.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Since basic auth is quite well-known, I'd suggest to have a helper method like before:
Currently I implement it using an extension method:
A small improvement, but I'd say it's worth it. LMK if you need a PR.
The text was updated successfully, but these errors were encountered: