Questions tagged [rxalamofire]
44 questions
0
votes
1 answer
Is there a way to quit browser session in Swift or RxAlamofire?
I am web scrapping a specific website to which the user has to be logged in. It is simple to logout the user, but after the logout the site requires the user to "close the browser". If the user only closes the tab and then re-enters the site, they…

eja08
- 4,600
- 3
- 13
- 19
0
votes
1 answer
RxAlamofire request is not fired for the second time i call the function
I have a function which is supposed to return an Observable. When I call the function for the first time, everything goes fine and I receive the result I expected, but for the second time that I want to make the same request with different…

eja08
- 4,600
- 3
- 13
- 19
0
votes
1 answer
ObjectMapper - map JSON dictionary as nested object
I am trying to user ObjectMapper to consume JSON response. So far my response looks like this:
{
"paramsStructure": [
{
"tiles": {
"0": {
"layout": {
"column": 0,
"colSpan": "1",
…

Maciej Grodzki
- 71
- 8
0
votes
0 answers
Upload multiple data, image and user data by using Alamofire doesn't work
I'm working on register page. by using Alamofire , I'm trying to upload multiple data (image and user data ), the problem is here when I make the request, It shows to me this a message (Message = "An error has occurred."). I have tried many ways to…
user8319594
0
votes
1 answer
How to Post request in RxAlamofire with Array as parameters instead of Dictionary?
I am trying to use RxAlamofire for Reactive requests. There is a method for creating POST request with -
public func request(_ method: Alamofire.HTTPMethod,
_ url: URLConvertible,
parameters: [String: Any]? = nil,
encoding:…

Mayur Deshmukh
- 1,169
- 10
- 25
0
votes
2 answers
RxAlamofire cancel network request
Below is the example code of RxAlamofire network request. My problem is that I want to cancel this request whenever the View Controller is dismissed.
I tried to assign this request to a global variable but requestJSON method returns…

Burak Akyalçın
- 302
- 5
- 26
0
votes
1 answer
Set request timeout on RXMoyaProvider
I am using Moya with RxSwift and I am trying to set the request timeout for the network call (API Calls) using below code as suggested :
which is including the custom Alamofire Manager when declaring your Provider
lazy var provider:…

i70ro
- 111
- 8
0
votes
0 answers
Alomafire: getting response body from DataRequest Object during request failure
How can we get response body from DataRequest object? I am using RxAlomafire.request method for making http calls. Need some data from response body when http request fails.
0
votes
1 answer
RxAlamofire: Ambiguous reference to member 'json(_:_:parameters:encoding:headers:)'
When I try to compile the code below, I get an error:
Ambiguous reference to member 'json(::parameters:encoding:headers:)'
The code was copied and pasted from a RxAlamofire Github repository page
import RxSwift
import RxAlamofire
class…

Blazej SLEBODA
- 8,936
- 7
- 53
- 93
0
votes
1 answer
RXAlamofire not returning data ( error or not)
This is my non-reactive code that works just fine.
func getLatestHtml2 () {
Alamofire.request("https://www.everfest.com/fest300").responseString { response in
print("\(response.result.isSuccess)")
if let html = response.result.value {
…

Devesh Laungani
- 129
- 3
- 12
0
votes
1 answer
How to emit error when get json with key
I'm using RxAlamorefire to handle network task in my app.
My problem is: When I make a request and it return json. If json has a key "error" I need emit error notification instead of onNext notification.
My code is like this one:
let observable =…

Trung Phan
- 923
- 10
- 18
0
votes
0 answers
RxAlamofire retry doesnt work
I am trying to use RxAlamofire with retry() but I can't make it work. I tried to add retry() block to different positions but it doesn't make any difference.
If I add retry(3) to end of apiClient.get(type: .posts).retry(3) it seems to work. Is…

Meanteacher
- 2,031
- 3
- 17
- 48
0
votes
1 answer
Limiting simultaneous downloads using RxAlamofire
Given my App will download files from a server and I only want 1 download to be progressed at the same time, then how could this be done with RxAlamofire? I might simply be missing an Rx operator.
Here's the rough code:
Observable
.from(paths)
…

Sebastian Roth
- 11,344
- 14
- 61
- 110
-1
votes
1 answer
Why use the responseWith method?
In the process of reading the RXAlamofire source code, there is a place that I don't understand very well.
Since this method is an observable object for creating a DataRequest, why call the responseWith method?
func request(_…

jun
- 59
- 3