User Tools

Site Tools


Jersey Client with Basic Auth

To add Basic Authentication to a web service call using the Jersey Client library a HTTPBasicAuthFilter instance need to be added to the WebResource.

WebResource service = Client.create().resource(url);
HTTPBasicAuthFilter filter = new HTTPBasicAuthFilter(username, password);

jersey_basic_auth.txt · Last modified: 2014/02/26 09:03 by mihael