Post

Replies

Boosts

Views

Activity

Reply to Calling a POST Form with URLSession.shared.dataTask
Thanks OOPer, I understand what you wrote, so, to my needs, I shoud make exactly the same thing but synchronous. I will look for it, if you have some basic writing about it, let me know aspStatus is a Class that return to me true or false (if false, a message why its false): class AspStatus {    var success: Bool    var message: String        init(success: Bool, message: String) {       self.success = success       self.message = message    } } I just don't understand your last part: You need to write everything you want to run after the task is completed within the completion handler.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’21
Reply to Calling a POST Form with URLSession.shared.dataTask
OOPer, you found the solution, I put it inside the completion handler and everything just worked as I needed. Just a problem of my newer in Swiftui , but I'm growing....... Thanks again.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Calling a POST Form with URLSession.shared.dataTask
Thanks, I will study transfer information from button to the completion handler Here it's my declaration (inside the view): @State var aspStatus = AspStatus(success: false, message: "")
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Calling a POST Form with URLSession.shared.dataTask
Thanks OOPer, I understand what you wrote, so, to my needs, I shoud make exactly the same thing but synchronous. I will look for it, if you have some basic writing about it, let me know aspStatus is a Class that return to me true or false (if false, a message why its false): class AspStatus {    var success: Bool    var message: String        init(success: Bool, message: String) {       self.success = success       self.message = message    } } I just don't understand your last part: You need to write everything you want to run after the task is completed within the completion handler.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to How to handle URLSession.shared.dataTask properly
I'm getting the same problem Have you solved it?
Replies
Boosts
Views
Activity
May ’21