added REST option for JSON post