Skip to content
0:00 / 0:00

#urlsession#json#networking

URLSession: JSON GET & POST Requests | Swift 3, Xcode 8

Kilo Loco

35K subscribers • 2 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Kilo Loco
  • Linked in the descriptionKilo-Loco/URLSessionJSONRequests
  • May be out of date. The tools, versions or practices it shows have likely moved on.

Beginner. No background in the topic needed.

85K views9 years ago2 recommendations

Web developmentMobile developmentSwiftiOS and SwiftUIHTTP, REST and GraphQL

Kilo Loco explains how to make GET and POST network requests using URLSession and handle JSON data in Swift.

Today we go over URLSession and how to make JSON GET and POST requests. This is a step by step tutorial that will explain what is happening in each line of code so you can grasp the full concept of how URLSession works and how to explore different APIs. Networking is a major part of iOS development and is almost always required for iOS developer jobs. The more you understand how to create your own networking requests, as opposed to using third party frameworks like Alamofire, the more efficient and lightweight your code can be. By the end of this tutorial, you will know how to send a GET and POST request with a JSON body, know how to convert data bytes into legible JSON, and become aware of some common bugs that show up when using URLSession. The finished project will be posted up on github which you can find the link here: github.com/Kilo-Loco/URLSessionJSONRequests If you have any questions or comments about the tutorial, or want to suggest a video to make, feel free to leave a comment below, or reach out to me on Twitter: twitter.com/kilo_loco If you found this tutorial helpful, make sure to subscribe to the channel for more great tutorials.

Why it's here

2 people recommend this

What people say. Recommended as a step-by-step guide for learning iOS networking and API requests without third-party libraries.

u/flyingweaponin r/swift • Recommends

On “What books can I read about Networking in iOS”

link to this video

u/foodandbeverageguyin r/swift • Recommends

On “Need help using openweathermap API to get the current temperature”

Is your issue that you don't know how to make an API request? This is an example