private static void getResponse(String requestMethod, String path, UrlResponse response)
throws MalformedURLException, IOException, ProtocolException {
URL url = new URL("http://localhost:" + PORT + path);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod(requestMethod);
connection.connect();
String res = IOUtils.toString(connection.getInputStream());
response.body = res;
response.status = connection.getResponseCode();
response.headers = connection.getHeaderFields();
}