Wrapper class for HttpGet / Post in Java?
Posted
by Tim Green
on Stack Overflow
See other posts from Stack Overflow
or by Tim Green
Published on 2010-05-13T19:28:19Z
Indexed on
2010/05/13
19:34 UTC
Read the original article
Hit count: 224
Hi,
Sorry, I'm quite new to Java.
I've stumbled across HttpGet and HttpPost which seem to be perfect for my needs, but a little long winded. I have written a rather bad wrapper class, but does anyone know of where to get a better one?
Ideally, I'd be able to do
String response = fetchContent("http://url/", postdata);
where postdata is optional.
Thanks!
© Stack Overflow or respective owner