HM/JPM: added importTrig to HttpClient (+some minor refactorings)