Implement add task through http api.