Skip to content

Instantly share code, notes, and snippets.

@beders
Last active September 29, 2015 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beders/fa6bcf6f319fb858f151 to your computer and use it in GitHub Desktop.
Save beders/fa6bcf6f319fb858f151 to your computer and use it in GitHub Desktop.
Hello World! Complete example
import us.monoid.web.Resty;
import java.io.IOException;
public class HelloResty {
// Hello World!
public static void main(String... args) throws IOException {
Resty r = new Resty();
// Get the content of the URL as text and print it
String hello = r.text("http://www.helloworld.org/data/helloworld.java").toString();
System.out.println(hello);
}
}
@beders
Copy link
Author

beders commented Jun 14, 2015

I turned it into a working example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment