Added dataType parameter to post method which defaults to 'json'