extract query from request url