generalize post request to use any io reader