I'm facing an issue when executing a simple program in Javalite where I'm testing an API GET call.
The method fetches the URL and reads the response code. But JavaLite is throwing as exception:
org.javalite.http.HttpException: Failed URL: "https://google.in"
Could someone help me understanding this issue?
My code is:
package com.java.lite;
import org.javalite.http.Get;
import org.javalite.http.Http;
import org.testng.annotations.Test;
public class GetCallTest {
@Test
public void getCall() throws Exception {
System.out.println(ConfigPropertyFile.getPropertyValues()); //This line is executed
Get get = Http.get(ConfigPropertyFile.getPropertyValues()); //URL being call from another class where I defined a static method.
System.out.println("Response code" + get.responseCode());
System.out.println("Response message = `enter code here`" + get.responseMessage());
}
}