Closed walshe closed 7 years ago
Hi,
how can I pass along 'Basic' authentication details like username and password like I would do like follows with Java/Jersey ?
ClientConfig clientConfig = new ClientConfig(); HttpAuthenticationFeature feature = HttpAuthenticationFeature.basic(username, password); clientConfig.register(feature); clientConfig.register(JacksonFeature.class); Client client = ClientBuilder.newClient(clientConfig); WebTarget webTarget = client.target("xxxxxxxx"); Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);
figured it out
def http = new HTTPBuilder('https://xyx') http.auth.basic(username, password)
Hi,
how can I pass along 'Basic' authentication details like username and password like I would do like follows with Java/Jersey ?