How To Send A Post Request in Swift to Create A User
HTML-код
- Опубликовано: 7 ноя 2024
- How To Send A Post Request in Swift to Create A User
🤙🏾 Subscribe to the tundsdev RUclips channel
www.youtube.co...
⏭ Next Video
How To Handle Networking Errors Handling In SwiftUI
• How To Handle Networki...
⏮ Previous Video
Passing data between views in SwiftUI to get our user details
• Passing data between v...
Ready to level up your SwiftUI skills?🚀
Learn how to tackle take-home projects in SwiftUI, nail interviews, and more with this FREE course!📚
This RUclips playlist teaches you everything you need know to land your first iOS role 🫂
📹 • SwiftUI Take Home Proj...
In this video, we'll look at how to send a POST request in Swift, so that we can create a user in our SwiftUI app using a Swift post request. We'll refactor our networking code, and look at the POST request HTTP method. This will allows us to see how to use get and post requests Swift.
What is a REST API? (REST API Explained for beginners)
• What is a REST API? (R...
Breaking down Swift Generics (Swift Generics Basics)
• Breaking down Swift Ge...
How To Use Codable in Swift (Codable Swift)
• How To Use Codable in ...
Passing data between views in SwiftUI with Binding (SwiftUI Binding, Passing Data In SwiftUI)
• Passing data between v...
Breaking down the SwiftUI App Lifecycle (iOS App Life Cycle)
• Breaking down the Swif...
SwiftUI iOS Take Home Test Resources
github.com/tun...
SwiftUI iOS Take Home Test Course (Learn SwiftUI Online For Free, SwiftUI Free Online Course, iOS Dev Job Interview Practice - Take Home Project)
• SwiftUI Take Home Proj...
👦 SwiftUI Sessions - Beginners (Learn SwiftUI Online For Free, SwiftUI Free Online Course)
• Learn SwiftUI From Scr...
I really need the next part, please post it soon as possible. Amazing work, ty
Glad you enjoyed it & the next videos are coming up very soon
Thank you! You have really great tutorials. It was very helpful
That’s great to hear, glad you found it useful
Thank you for covering post request also 👍🏼
No problem 😊
Another great one TD! Can you explain the decision point where you decide to put add'l functionality into an extension rather than the body? Thanks for the great content!
Thanks & I just do it to break up configuration and keep things clean. There’s no performance boost its purely for organisation purposes 👌🏾
Hey Tunds, I'm getting a lot out of your course and feel like this will set me up nicely for any Take Home Project I have in the future. Just wondering about the encoding because JSON decoding is in the Network Manager, but the JSON encoding is in the View Model. Is this done because the JSON decoding has to happen after the GET, but the encoding needs to happen before it reaches the POST, or is there another reason? Thanks! 😸
Purely for simplicity my man, didn’t want to overcomplicate the network manager. It could 100% be in the network manager but to achieve this i’d use generics. Maybe a lil challenge for you 🤝
@@tundsdev, thanks, and I will give that a try after this course! 😸
So nice!! Im looking forward to nexts🔥🔥
Thanks, glad you enjoyed it 👌🏾
Awesome job! Thank you!
Glad you enjoyed the content 👌🏾
one doubt here if we are sending data over the network, why is the http method defined on the overloaded method is set to be a .GET instead of a POST(data)
This is so you have a default, most times when you make a network request they’ll be GET requests. Rather than having to specify GET for every request it will be the default, you can then choose to override it with POST if you want to 👌🏾
Hi, getting this error on view when write on change method - > Instance method 'onChange(of:perform:)' requires that 'ViewModelImpl.State' conform to 'Equatable'
Hi, i’m not too sure if you changed the enum to have associated values. Cos enums without them get equatable conformance automatically which why i don’t need to add it.
For your issue you need to add “enum SubmissionState: Equatable {…” and then if it asks you to add missing protocols then you’ll need to do something like this, hope this helps.
medium.com/@aainajain/equatable-for-enum-with-associated-value-e07d9ab20e8e
@@tundsdev Yes, I am passing data through enum case, that's why it is not worked, now I am changing my code as per your suggestion , Its working now, Thank you for your great help. 👏