Questions tagged as 'alamofire'

0
answers

Example Login with basic auth authentication using Alamofire?

I'm trying to make a login screen where I use Alamofire to make the request, but with the examples from the Alamofire website itself, it's not working. If someone can help with a sample code, I would appreciate it a lot !! What's the probl...
asked by 06.03.2017 / 22:58
1
answer

Migration from Alamofire 2 to Alamofire 4. Extra Argument in call (Request)

When I made the requests to the server I used the following code let URL = Foundation.URL(string: "http:....")! let mutableURLRequest = NSMutableURLRequest(url: URL) mutableURLRequest.httpMethod = "POST" let parameters = ["UserName": "Teste"]...
asked by 12.01.2017 / 11:08
1
answer

JSON object with Array. Migration from swift 2 to swift 3

Previously in my app when I was making a call to the server and if there was an error I would do the following: Alamofire.request(mutableURLRequest).responseJSON{ response in if let JSON = response.result.value{ if JSON.count != 0{ let errorLi...
asked by 18.01.2017 / 16:38
1
answer

Post swift error with alamofire

But once I come to ask for help from you. I'm developing an application in Swift using web service writing in java hosted at Amazon AWS. When I try to make a registration via post the registration is not performed. The error that returns me i...
asked by 03.09.2016 / 05:31
1
answer

How to make a request using alamofire and make the following lines of code wait for the response of the request?

class func findProfessions() -> [PhotoProfession] { var professions = [PhotoProfession]() let backendless = Backendless.sharedInstance() if let p = backendless.data.of(Profession.ofClass()).find() { for prof i...
asked by 16.07.2016 / 06:28
1
answer

Problems with Array conversion in Swift 3

With the update of swift3 I'm getting the following error "type 'Any' has no subscript members", I've seen lots of questions about it and tested most of them but to no avail. The code where I'm having this error is as follows: Alamofire.reque...
asked by 18.10.2016 / 18:05
1
answer

How to guarantee the type of value returned by a closure?

I can perform the requests with Alamofire, but I saw that it is not possible to use return within the scope of success. After a search, I saw that the solution is to use a closure pattern, to get the value of the request when it is finished,...
asked by 24.04.2016 / 06:48
1
answer

How to call a web service in swift2 Xcode 7

I have already tried 1000 and 1 thing and still could not find a way to call my web service and get the results you want. Can someone tell me the best way to connect to my web service and call my methods in swift2 with xcode 7?     
asked by 02.02.2016 / 22:55
1
answer

How to work with response from Alamofire in Swift 4?

I have the following request that returns me a json I can not get the ulrs of live Alamofire.request(urlRequest).validate().responseJSON { response in print(response.data) do { if let data =...
asked by 10.01.2018 / 20:12