Best Way To Handle Api Request Swift

Hi, for a couple of days, I’ve been looking for an ultimate solution for API Consuming Single Function that can make all the requests, and also we can provide any data type as body data and response. And the most amazing thing is you don’t need any packages for that
Let me show you how I did it.

Photo by Alina Grubnyak on Unsplash

First I made a class with URLSession.

Website

Tags: API Handle