I am making an iOS app that makes requests to an API. The request is in this format:
curl -X PUT -H "Content-Type: application/json" -d '{"username":"blabla@hotmail.com","password":"blabla"}' "https://server.mywebsite.com/login"
The API can only accept single-quoted strings in the body but I can't make a string with single quotes in Swift without it adding backslashes and making the string unreadable by the API.
"\'{\"email\": \"blabla@hotmail.com\", \"password\": \"blabla\"}\'"
Is there a way I can pass this string in Swift without the backslashes? Or is there a String or JSON encoding that is in that format?