refactored post with header base rest client