added "apiClass" header and "apiClassHeader" parameter to the invoke() method.