IOKOKOKKKOKO
[tor-test-java.git] / src / main / java / domain / tld / CurlWrapper.java
blob38234e10a7429930420b89713c08c80612f85dc8
1 /*
2 * To change this license header, choose License Headers in Project Properties.
3 * To change this template file, choose Tools | Templates
4 * and open the template in the editor.
5 */
6 package domain.tld;
8 import java.io.IOException;
9 import java.net.HttpURLConnection;
10 import java.net.MalformedURLException;
12 /**
14 * @author salvix
16 public class CurlWrapper {
19 public static String get(String url) throws MalformedURLException, IOException
21 Curl c = new Curl();
22 c.setUrl(url);
23 HttpURLConnection cn = c.get();
24 String output = c.getOutput(cn);
25 return output;
28 public static String getWithProxy(String url) throws MalformedURLException, IOException
30 Curl c = new Curl();
31 c.setUrl(url);
32 HttpURLConnection cn = c.getProxy();
33 String output = c.getOutput(cn);
34 return output;