Added ability to post the data, either as JSON or specifying a file.