Can anyone guide me how to print the web service request and response from dataTaskWithRequest in json format while using swift 4.0 and objective C.
Links tried:
How to print NSMutableURLRequest?
I can print them, but its not printing in proper format. I need in a format so that I can paste it in postman or web browser and test.
Request Format which I need:
eg:https://restcountries.eu/rest/v2/name/aruba?fullText=true
For Response:
Need the response format like the above url's response which I can view them in http://jsonviewer.stack.hu.