Can we re-use the existing buildRequest function?  It looks almost identical to this.  You can always set any additional flags after you call build request, like we do in handleFunctionType(...).