We should make this a method on WebResource