All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.framework.utils.ResponseCheck Maven / Gradle / Ivy

Go to download

A jar to include in your test setup that drives the cucumber jvm tests. Facilitates in executing the cucumber tests in parallel. Contains libraries such as to read from Excel, random generator etc.

The newest version!
package org.framework.utils;

import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;

public class ResponseCheck {

	/*
	 * @author Hemanth.Sridhar
	 */
	
	
	public int getResponseCode(String urlString) throws MalformedURLException, IOException{
	    URL url = new URL(urlString);
	    HttpURLConnection huc = (HttpURLConnection)url.openConnection();
	    huc.setRequestMethod("GET");
	    huc.connect();
	    return huc.getResponseCode();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy