Removed endpoint property. Now it is received as parameter