Connection refused: connect

Hi All, Getting the below error when trying to run the Rest Assured code to get the request FAILED: GetWeatherDetails Connection refused: connect   Below is the code being used. Please help in resolving this issue. public class NewTest { @BeforeTest public void setProxy() { System.setProperty(“http.proxyHost”, “”); } @Test public void GetWeatherDetails() { //Specifies the base URI of the restfull web service RestAssured.baseURI = “”; RequestSpecification httpRequest = RestAssured.given(); Response response = httpRequest.request(Method.GET, “/IN”); String responseBody = response.getBody().asString(); System.out.println(“Response Body is =>” + responseBody); } }

Add Comment
  • 0 Answer(s)
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.