networking GET & POST HTTP methods using URLsession. GET: 1.i have used jsonplaceholder url// please check the website 2.the idea is to get the list of users. 3.pass the url as string. 4.create a url session 5.call the data task method with reading options 6.get the raw data in bytes and serialixing into json format and printing the output. 7.print the output & get list of users using URL Session. POST: 1.I used URLRequest to get the url. 2.Added a httpmethod : POST. 3.since it's a post request,i've used writing options. 4.getting the data. 5.serializing into json format using reading options. 6.used do,try,catch blocks at appropriate places
VigneshRepo001/URLsessions
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|