Changed contentType and datatype of ajax call