Postman is a popular app for API testing. If you are an iOS Developer, high chances you must have used it. Postman has a useful feature, which let us generate networking code in our preferred language, for the APIs we are testing. Let me show you how it works.
Fill in details of the API call in postman or select one from the history tab, for which you need to generate code. Test the API call, if all looks good, press the ‘Code’ option.
You can now see the code for the API request. You can also choose the programming language of your preference using the drop-down at the top.
Even if you are using a third party library like Alamofire, you can still copy some code, like headers and body parameters.
Let me know in comments if you find this useful.