altered rest client to include .to_json in post request