Why am I getting 'swift no content' errors and how do I fix them? or How to handle 'swift no content'

18 Replies, 1676 Views

Swift no content errors are the bane of my existence.

Here’s a dumb thing that worked for me: adding `Accept: application/json` to the headers. Some APIs get weird if you don’t explicitly ask for JSON.

Also, if you’re using Alamofire, `validate()` can help catch these cases early.

Messages In This Thread



Users browsing this thread: 1 Guest(s)