ws-deprecated icon indicating copy to clipboard operation
ws-deprecated copied to clipboard

Accessing AF's response validation

Open chadhobson opened this issue 8 years ago • 2 comments

I pass a custom Accept header to my API but it's throwing Alamofire.AFError.ResponseValidationFailureReason.unacceptableContentType error and I don't see AF exposed anywhere for me to add to the allowed content types validation array.

Anyone have any suggestions?

chadhobson avatar Aug 23 '17 19:08 chadhobson

Hi @chadhobson,

Unfortunately this is not supported at the moment, the reason being we never needed it. I think we should add this functionality though :)

  • Solution 1: Have a way to access AF so that users can access the whole underlying api.
  • Solution 2: Only add acceptableContentTypes wrapper
  • Solution 2: Add both

I'd love your thoughts on which one you prefer (I like nb 3) @maxkonovalov I'd love your take on this as well :)

Cheers,

s4cha avatar Aug 24 '17 13:08 s4cha

@s4cha I'd vote for the third option solely because the package will appeal to the broadest number of users.

chadhobson avatar Aug 24 '17 13:08 chadhobson