Link to home
Start Free TrialLog in
Avatar of santom
santom

asked on

jersey REST client - to consume https REST service api. by passing sso token in headers of client request

I need to consume  a HTTPS REST service API, by passing logged in user sso token in headers of client request. I am able to consume http REST service api by using below code. Please can you help with SSL code to consume https service api.

Client client = ClientBuilder.newClient();
WebTarget target = client.target("http://localhost:8080/RESTEasyApplication/user-management/users");
Invocation.Builder invocationBuilder = target.request(MediaType.TEXT_PLAIN_TYPE);
Response response = invocationBuilder.get();
System.out.println(response.getStatus());
System.out.println(response.readEntity(String.class));
ASKER CERTIFIED SOLUTION
Avatar of Kevin Cross
Kevin Cross
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial