Check added for empty endpoint
In PHP version < 7.3 if endpoint was empty, no error was thrown by curl. But after the upgrade its throwing URL malformed error. So added the check to hit curl post if endpoint is not empty
In PHP version < 7.3 if endpoint was empty, no error was thrown by curl. But after the upgrade its throwing URL malformed error. So added the check to hit curl post if endpoint is not empty