added global curl post function