public static function getRestServiceCall(URL : String, userid : String, password : String) : Response { // Prepare the request Request request = new Request(Method.GET, URL) // Add the client authentication to the call ChallengeScheme scheme = ChallengeScheme.HTTP_BASIC; ChallengeResponse authentication = new ChallengeResponse(scheme, ID, Pwd); request.setChallengeResponse(authentication); // Ask to the HTTP client connector to handle the call Client client = new Client(Protocol.HTTP); Response response = client.handle(request); return response; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)