에러: AFNetworking ErrorDomain Code=-1016 Expected content type 


AFNetworking을 사용하다가,

http 통신은 성공했지만 failure 블럭으로 떨어지는 경우가 발생.


허용되지 않은 content type 이었던 것이 원인.


사용하는 Operation 클래스의 + (NSSet *)acceptableContentTypes  메소드에 컨텐츠 타입을 추가하면 해결할 수 있다. (나의 경우에는 text/plain이었다.) 



그런데, 에러에서 unexpected content type이라고 표현하는게 맞지 않나??

+ Recent posts