This doesn't seem too clean to me, there is maybe a case for using another class, e.g. some type of "request" object. But as longs as this doesn't get more complicated this will probably do.