Questions tagged [rxalamofire]

44 questions
1
vote
1 answer

Bind Alamofire request to table view using RxSwift

So I have been researching RxSwift for a couple days, and am trying to create a simple app with it. I have bound the searchController of my table to the results, which feed into the cellForRowAt function. How do I bind the alamofire response to each…
Peter S
  • 827
  • 1
  • 8
  • 24
1
vote
1 answer

POST binary data using swift

I would like to post binary data through RxAlamofire, Alamofire or even without any library but after some days of research and tries, I'm not able to do it. Here you can find the POSTMAN example of the request that I am trying to reproduce is: Is…
Bruno
  • 299
  • 1
  • 7
  • 23
1
vote
2 answers

Error in closure tuple parameter

I'm trying to write an API layer using RxSwift and RxAlamofire. Here is the code for API request. public func _request(_ method: Alamofire.HTTPMethod, url: URLConvertible, parameters: [String : Any]? , encoding: ParameterEncoding, headers: [String…
Vinod Radhakrishnan
  • 441
  • 1
  • 6
  • 18
1
vote
1 answer

How to get response of a nested api call using RxSwift and alamofire?

How to get response of a nested api call using RxSwift and alamofire? Here i get a response from an alamofire api cal and with that result i need to call another api call. I want to get the second api call response. Can anyone suggest me a solution…
gunjan
  • 21
  • 1
  • 6
1
vote
1 answer

RxAlamofire - event on download completed missing

I'm using RxAlamofire for downloading file. I have something like this: let downloadResult = download(request, to: destination) Unfortunately downloadResult observable doesn't emit next event on download completed, it only emits onCompleted. I…
Wujo
  • 1,845
  • 2
  • 25
  • 33
1
vote
0 answers

How to refresh Api authorization token using Alamofire & rxSwift?

I try to manage rxswift & Alamofire to get response. These functions get response successfully when token is not expired. But when the token is expired, I don't know how to refresh token and then retry to get response using new token. What should I…
Beginnerrrrrr
  • 537
  • 1
  • 8
  • 27
1
vote
0 answers

RxAlamofire - Subscription not working

I'm learning RxAlamofire and I faced following issue: in this snippet fragment of code from onNext, onError and onCompleted doesn't get invoked, as if the subscription wasn't working at all. To compare, piece of code with normal Alamofire works just…
AndrzejZ
  • 245
  • 2
  • 10
1
vote
1 answer

RxAlamofire: retryWhen drops into subscribe block

I'm trying to implement an alamofire call with max retries. Code is below: RxAlamofire.request(.post, URL, parameters: parameters, encoding: JSONEncoding.default) .observeOn(MainScheduler.instance) .retryWhen { (errors: Observable)…
Matthew
  • 453
  • 1
  • 7
  • 15
0
votes
1 answer

Got error Alamofire.AFError.ServerTrustFailureReason.noRequiredEvaluator when using DisabledTrustEvaluator

I've got a class AuthenticationApiClient that has this integration test: func testCheckPhoneNumber_WithExistingPhoneNumber_ShouldReturnRegisteredStatus() throws { let sessionFactory: () -> Session = { let serverTrustManager =…
0
votes
0 answers

Alamofire NSURLErrorDomain code=-999 cancelled

I am using Alamofire to get information from an API. My problem is that when I call a specific API method, it doesn't returns nothing, I only get the error inputDataNilOrZeroLength. After investigating I get the next error in the profile:…
Gray
  • 81
  • 4
0
votes
1 answer

Created observable doesn't emit anything

I'm trying to create a function which returns Observable<(HTTPURLResponse, Any)> using RxAlamofire: class APIManager { let disposeBag = DisposeBag() func getResponse(credentialData: Credentials, ulr: String)->Observable<(HTTPURLResponse,…
0
votes
1 answer

Where is the actual API call within this RxAlamofire source code?

I'm trying to figure out where data in an API call is coming from. Specifically, I want to know where req.user is coming from as from what I can tell there's no paramters being passed into the API call. Here's the server-side code (in JS): let…
branx
  • 43
  • 5
0
votes
0 answers

How to convert URLRequest to Alamofire.URLConvertible

how to covert URLRequest to Alamofire URLConvertible I am getting error while trying to convert following is my code var request = URLRequest(url: URL(string: "some url")!) request.httpBody = json RxAlamofire.request(.post, request as!…
alphanso
  • 409
  • 5
  • 22
0
votes
4 answers

RxAlamofire make post call with json body

I want to make post call using RxAlamofire not able to find any method to do so tried using requestJSON method but there is no paramter to pass post json in RxAlamofire.requestJSON(.post, url) how to make post call and pass json data to post call…
alphanso
  • 409
  • 5
  • 22
0
votes
1 answer

RxAlmofire pass parameters to requestJSON [:]

Following is method provided by RxAlamofire for making requestJSON request there is no method to pass parameters [String : String] RxAlamofire.requestJSON(.get, url) .subscribe(onNext: { [weak self] (r, json) in if let jsonResult…
amodkanthe
  • 4,345
  • 6
  • 36
  • 77