pass query parameters to resource, fixes #39