Convenience method for querying a resource