iOS Swift 5 Tutorial: Make HTTP POST Requests to an API

  Рет қаралды 60,658

Brian Advent

Brian Advent

Күн бұрын

Пікірлер: 35
@awais.fayyaz
@awais.fayyaz 5 жыл бұрын
Cool video, Brain :) Keep up the great work
@jng88
@jng88 3 жыл бұрын
Thank you very much! That tutorial saved me ❤️
@shingetzu88
@shingetzu88 5 жыл бұрын
Hi Brian, Thanks for the tutorial. Question, how come your Message is a class and not a struct?
@oisbelsimpsonverdecia9458
@oisbelsimpsonverdecia9458 4 жыл бұрын
Hello. Can you do a video about GET or POST request to an API that the server require Basic Auth in Swift 5. There is some info about a delegate implement authentication challenge but is not clear. Thank you in advance.
@abdorizak
@abdorizak 2 жыл бұрын
I also need this
@DjLeonSKennedy
@DjLeonSKennedy 4 жыл бұрын
JavaScript "fetch" now looks ideal of all possible way to make request in the universe! what a noisy language this swift
@ucmanhpham5647
@ucmanhpham5647 4 жыл бұрын
I am not well about javascript, but i guess that Js is script lang in browser and request JSON type is Javascript code, Of course, it is convenient to fetch
@darinburch9043
@darinburch9043 3 жыл бұрын
THANK YOU SOOOOOO MUCH!!!
@artempushko
@artempushko 3 жыл бұрын
Thank you!!!
@nassimakkache4836
@nassimakkache4836 5 жыл бұрын
thanks for the video Brian. i want to opload a picture to server how i can do ? please
@AlexCio
@AlexCio 5 жыл бұрын
Great tutorial! :)
@ea9849
@ea9849 2 жыл бұрын
Shouldn't post return 201 created instead of 200?
@kolinj9186
@kolinj9186 4 жыл бұрын
Thank you for this! Is there a link anywhere to the files? I try to copy all the code but have some typos that I can't seem to find....
@brianelliott1931
@brianelliott1931 4 жыл бұрын
Me too!
@zidniryi
@zidniryi 3 жыл бұрын
Can you share the code
@guruitcompany
@guruitcompany 5 жыл бұрын
Cool, thank you 👍❤️
@BarisSaglam0
@BarisSaglam0 5 жыл бұрын
I start to learn developing IOS apps with Swift. I want to ask something. I always use libraries like 'Moya' or 'Alamofire' to request API. What do you think should i use libraries or is that enough ?
@BrianAdvent
@BrianAdvent 5 жыл бұрын
Alamofire e.g. is really powerful and simplifies a lot of networking tasks. However, it is a dependency (well maintained and tested but still a dependency) that you might not need for the usage of a simple API. If it gets more complex (image data transfer, certificate handling, request retrying, ...) then I would also choose e.g. Alamofire.
@shivaskanthan6144
@shivaskanthan6144 5 жыл бұрын
I would suggest using URLSessions as opposed to AlamoFire. There are a lot of excellent articles on it replacing AlamoFire as the go to library since its built and managed by Apple
@BarisSaglam0
@BarisSaglam0 5 жыл бұрын
@@BrianAdvent Thanks for your reply :)
@BarisSaglam0
@BarisSaglam0 5 жыл бұрын
@@shivaskanthan6144 Thanks for your reply :)
@dolphinmoto3226
@dolphinmoto3226 5 жыл бұрын
Hi, Brian! Thank you for videos! I have been writing program on mac os. I need to store application preferences. What i should use? Core data? Bundles? Or something else. Can u help me please? Thanks a lot!
@sinntechnologies6285
@sinntechnologies6285 4 жыл бұрын
I had to find an answer to these questions a couple weeks ago. If you have relational data, you would use core data. If you have none private data with small bits of information, such as theme colors. You would use UserDefaults. If you have small amounts of data that needs to stay private, such as passwords or tokens. You would use Keychain. I know this was a year ago, but in case others are looking.
@dolphinmoto3226
@dolphinmoto3226 4 жыл бұрын
Thanks! Really good answer👍😃
@steveroseik
@steveroseik 3 жыл бұрын
why dont you share the code?
@EnglishTurkishExpert
@EnglishTurkishExpert 2 жыл бұрын
How to add another parameter to the body?
@mehankjain6201
@mehankjain6201 4 жыл бұрын
Hi I want to post json array with json objects using swift but not understanding how to solve this problem can you please help me Example [ {"ABC":"ABC"},{"ABC":"ABC"} ]
@ramazan5451
@ramazan5451 2 жыл бұрын
The error comes out (2021-11-19 12: 31: 50.086033 + 0600 ParseJson [23603: 750804] [UICollectionViewRecursion] cv == 0x14a8ca000 Disabling recursion trigger logging, An error occuredresponseProblem) please help
@devfurkan
@devfurkan 3 жыл бұрын
i ask a question ? . im write self.resourceURL = resourceURL . ı get error " assigning a property to itself ". what ı should do and your suggestion? please help brian.
@sunnykumarrathore5244
@sunnykumarrathore5244 3 жыл бұрын
try self.resourceURL = self
@NikeTao
@NikeTao 5 жыл бұрын
Is there by chance a WebSocket framework that uses Swift?
@devfurkan
@devfurkan 3 жыл бұрын
İ use host but i have a id and password , how to add in code this id and password
@edmfestivals6066
@edmfestivals6066 4 жыл бұрын
Why not use postman
@devhopes
@devhopes 5 жыл бұрын
Great video Brian. I am looking to do something similar. I have a ride sharing app where the rider makes a payment through PayPal and the driver gets paid through PayPal as well. The payment made from the rider is working perfectly but somehow having an issue getting the payout to the driver to work in swift. The way it was done in Android was, at the touch of a button and the balance owing to the driver in a text view, a post request is sent through Firebase functions to PayPal ... I have sent to your email the code on how it is done through Android - I need help how to do this through Swift. PLEASE HELP ~ Thanks in advance ~. lizgcanada
@miheiheld4458
@miheiheld4458 5 жыл бұрын
link on the Get request video kzbin.info/www/bejne/qpXbfHyGpbV3d6s
iOS Swift Tutorial: Use Web APIs and JSON Data with Swift 5
32:22
Brian Advent
Рет қаралды 92 М.
SWIFT/iOS - Alamofire ile HTTP işlemleri
37:12
Mehmet Can Seyhan
Рет қаралды 2,2 М.
黑的奸计得逞 #古风
00:24
Black and white double fury
Рет қаралды 20 МЛН
Cool Parenting Gadget Against Mosquitos! 🦟👶 #gen
00:21
TheSoul Music Family
Рет қаралды 30 МЛН
Всё пошло не по плану 😮
00:36
Miracle
Рет қаралды 2,7 МЛН
Who’s the Real Dad Doll Squid? Can You Guess in 60 Seconds? | Roblox 3D
00:34
URLSession: JSON GET & POST Requests | Swift 3, Xcode 8
37:31
Kilo Loco
Рет қаралды 84 М.
How To Work With Any API (API Tutorial using URL Requests)
27:07
CodeWithChris
Рет қаралды 125 М.
Swift API Calls for Beginners (Networking) - Async Await & JSON
25:35
黑的奸计得逞 #古风
00:24
Black and white double fury
Рет қаралды 20 МЛН