added a method option to enable ajax PUT in addition to POST