add getTarget method to help compile target url and query parameters