iOS Swift Tutorial: Working with the Web: HTTP, URL, and REST API

preview_player
Показать описание
In this Swift API tutorial, you will learn the basics of working with the web. I will give an introduction to HTTP and URLs. I am using a REST API do fetch data about cat breads and cute cat images. You will see how to use URL session in Swift to get JSON files and images.
This is a very important topic, especially if you are planning to land a job as an iOS developer soon. Using a API in a take home project is a very common task.

Overview
00:00 introduction
07:15 HTTP
14:38 Request
19:09 URLSession and JSON
30:05 fetching images
36:39 response and status code

Resources:

🤩 Learn more

Books:
Develop in Swift Data Collections, Chapter 2.4

⬇️ Source Code:

If you liked what you learned and you want to see more, check out one of my courses!
👩🏻‍💻 Combine course

#Swift #Networking #URLSession #HTTP #URL #FetchData #REST #API
Рекомендации по теме
Комментарии
Автор

You are very good at explaining things. I do hope you will not quit making videos.

kazzerlea
Автор

[That's a comment for the channel and not only for this video]
Thanks for the video, Karin. I loved the cat at the end. Also, I really like the way you structure your code, as a beginner I always find it confusing when I see influencers coding everything in a single file, I reckon that's why it took me so long to understand MVVM. You are kind of breaking these paradigms for me, thanks!

One more thing, as a beginner, I would like to know more about a few keywords you use in your code, for e.g the [unowed self] in a closure. I know I can look it up, but it makes it a lot easier if you explain complex clauses to newbies like me while you are coding.

I can't wait to marathon all of your videos to understand Combine deeper. One day I want to be as good as you are in Swift <3.

MauricioChavesDias
Автор

The cat API is so much better than the dog Api. Cat owners ftw

bgriffin
Автор

There can't be enough "cat".🤩😂

marceljaeger
Автор

Amazing karin, I am new to networking and was unable to understand it, you made it very is easy for me Thanks💜

ayushthummar
Автор

Thank you for the video, you were very helpful !

VlasiosSokorelosTheDarkwavist
Автор

Hi Karin, thanks again for all the great material. I am curious about two things. 1) will you be cover using rest and json parsing with combine? 2) Will you be covering best practices for syncing web data with CoreData?

lincolndickerson
Автор

Please.... tell me how to upload multiple file and view thumbnails....

aengmuhidin
Автор

can you help me please? I can parse JSON file for my appli, but one of my keys "content" contains String with HTML attribute... I need extract URL contains in the string HTML... I can do that?

bocetta
Автор

how to fetch image and show/display in swiftui's Display
Anyone please help

harshyadav
Автор

você não faz ideia do quanto me ajudou! se eu te visse na minha frente te dava um beijo na boca!!!

kevinsouza