Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
An easy to use pure Java wrapper to read from a URL. Cookie, proxy, useragent, post data, and referrer are easily configurable. http://konloch.me
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Type||Name||Latest commit message||Commit time|
|Failed to load latest commit information.|
This is a very simple HTTPRequest wrapper I wrote in Java, it currently supports setting post data, cookies, useragent and it has proxy support. Example: HTTPRequest request = new HTTPRequest(new URL("http://the.bytecode.club/")); request.setTimeout(10000); request.setPostData("postdata=yes&awesome=yup"); request.setReferer("http://google.com/"); request.setCookie("cookies=yes;cool=sure"); request.setProxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("127.0.0.1", 81))); String webpage = request.read(); for (Map.Entry<String, List<String>> k : request.getLastConnectionHeaders()) System.out.println(k.toString()); Ofcourse you can just create a simple request by doing: HTTPRequest request = new HTTPRequest(new URL("http://the.bytecode.club/")); String webpage = request.read(); And that will set everything for you automatically.