
Library/JQuery
Ajax 요청시 dataType과 contentType의 의미는 무엇일까요?
다음과 같은 ajax요청을 해본 경험이 있다면 dataType과 contentType의 의미에 대해 궁금해 한적이 한번은 있을 것 입니다. $.ajax({ url : '/signup', data : JSON.stringify(data), type : 'post', dataType: 'json', contentType: 'application/json; charset=utf-8' }).done(function(result) { console.log("회원가입 완료"); }).fail(function(xhr, status, errorThrown) { console.log("회원가입 실패"); }); dataType : 서버에서 어떤 타입을 받을 것인지를 의미합니다. 생략했을경우에는 jQuery가 MIME타입..