Changed endpoint content to async method.
merged with upstream