Tag Archives: http

REST Web Services in Java

I’ve been taking a look at jersey today. It’s an implementation of JSR 311, which is a proposed spec for implementing REST-like web services in Java. I started with the tutorial, which is quite frankly pretty bloody simple. @Path("/helloworld") public class HelloWorldResource { @GET @Produces("text/plain") public String getClichedMessage() { return "Hello World"; } } @Path("/helloworld") […]

Varnish

I listened to an interview about Varnish this morning. It was on the excellent bsdtalk podcast. Varnish is an attempt to write a high performance HTTP accelerator (reverse proxy). It grew out of frustrations with the performance of squid. Because it’s focussing on a much smaller problem space, it’s much simpler to use. Anybody who’s […]

PUTting an URL

Today, somebody at work wanted to PUT some data to an URL. It’s part of an internal web service we use. Should be easy write. In Perl, it’s pretty trivial. my $ua = LWP::UserAgent->new(); my $req = PUT ‘http://example.com/dest’, Content => $ARGV[0]; my $resp = $ua->request( $req ); die $resp->status_line, “\n” unless $resp->is_success; That takes […]