Questions tagged [alamofire-request]

59 questions
0
votes
1 answer

Alamofire request is not executed in swift 5

I have been using Alamofire in my whole project. Now in one of my modules, the Alamofire.request() is not getting executed. I tried putting a breakpoint and it showed that all of a sudden the request is being skipped. As I am working on a live…
varsha94
  • 249
  • 1
  • 6
  • 22
0
votes
1 answer

How to call a post API which has parameters like get api in Alamofire Swift?

I have checked many stack overflow questions but unable to find answer for the following problem. How can I request a post api which has parameters like get api using Alamofire…
0
votes
3 answers

Alamofire Passing Parameter With following type

How to send this data as parameter in alamofire request as parameter? What I'm doing is: Requesting Service: I'm getting this: I Supposed to get this by sending following way of data:
Abhishek Mitra
  • 3,335
  • 4
  • 25
  • 46
0
votes
0 answers

What is the correct way to send a class in the body of a service with alamofire

I am trying to execute this method that I did on android where with the help of retrofit with the @Body clause I can send data in the service body, as it is appreciated I do not need to use key - value, I only use @Body and the service works…
dbenitobaldeon
  • 324
  • 3
  • 20
0
votes
1 answer

Does Alamofire request actually run in the background thread?

I'm using Alamofire for the first time and I have a question. I searched and found a similar post on stackoverflow but the answers are very confusing, even the documentation is confusing. Alamofire is pretty convenient because I don't have to create…
0
votes
1 answer

Unable to succeed with GET request with Parameter using Alamofire

Using Alamofire for Network call. My requirement is, need to send body in GET request. Have tried the below code func getForms(formTypes: [Int], userInterestIds:[Int], completionHandler: @escaping (_ status: Bool, _ response :…
Ramdhas
  • 1,765
  • 1
  • 18
  • 26
0
votes
1 answer

Error on Void with Alamofire and PromiseKit with Swift (Request)

n my last projects I have been using alamofire and promisekit to connect to my web services Now I have a new version of both and when I create a request I get this error Cannot convert value of type 'DataRequest' to closure result type 'Void' this…
Dimoreno
  • 227
  • 3
  • 15
0
votes
0 answers

Invalid address

My app is crashing a lot lately and it's throwing this as an error: NSOperationQueue 0x2806fd260 (QOS: UNSPECIFIED) EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000. I can't find the call that causes this problem. Can someone help me solve…
marwa_kh
  • 1
  • 4
0
votes
1 answer

Accessing Files from Alamofire Download Request

So I made a download request using Alamofire and this request and return image, voice, video and I was able to see the file in through the destinationURL but my question is how do I convert the request result to data I can use, like if I got image…
Nouf
  • 733
  • 1
  • 11
  • 32
-1
votes
1 answer

Conditional cast from 'AFError' to 'AFError' always succeeds

I'm using Alamofire and after I do the fetch request I'm handling the error with: guard case let .failure(error) = response.result else { return } if let error = error as? AFError { switch error { ... } } Problem: In line if…
Arturo
  • 3,254
  • 2
  • 22
  • 61
-1
votes
1 answer

Alamofire POST request: responseSerializationFailed

I have a problem using swift because I need to send a Json like this: { "package": { "description": "Pink iPad", "contentValue": 120.01, "weight": 1.01, "length": 30.01, "height": 15.01, "width": 20.01 }, …
Antonio Labra
  • 1,694
  • 2
  • 12
  • 21
-1
votes
2 answers

Alamofire set timeout only for specific a request

I'm sending requests using Alamofire as below. I need to know how can I set the timeout only for a specific request like this Alamofire.request(URL, method: .post, parameters: parameters, encoding: JSONEncoding.default, headers:…
hashB
  • 113
  • 1
  • 12
-1
votes
1 answer

Alamofire parameter with multiple values in one Key

How to send parameter as alamofire parameter for the following data? data : {"username":"username","password":"password"} I want to achieve following through alamofire paramter, but I failed to achieve this. what I'm doing is: let parameter:…
Abhishek Mitra
  • 3,335
  • 4
  • 25
  • 46
-1
votes
2 answers

How to send json in HTTP request with alamofire

I am still learning the programming in Swift, I have successfully consumed services with Alamofire, but now I face the following problem, I have a service where I sent 2 json in the URL and I really have no idea how to send this data, I have seen…
dbenitobaldeon
  • 324
  • 3
  • 20
1 2 3
4