Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Swift 4] Add ability to pass in a dedicated queue for processing network response #230

Closed
joeboyscout04 opened this issue Jun 5, 2018 · 0 comments

Comments

@joeboyscout04
Copy link
Contributor

joeboyscout04 commented Jun 5, 2018

Description

The Swift generator uses Alamofire under the hood, which provides this ability to pass in a dedicated background queue for processing responses. The default is the Main thread. This can cause performance problems when the body of the request is large.

openapi-generator version

3.0.0

Suggest a fix/enhancement

It would be simple to alter the Swift generator's AlamofireImplementations execute(completion: error:) method to include an optional argument for queue (default to nil). The queue could then be passed to processRequest(completion:) and then on to the various Alamofire response() methods.

Then the user could implement their own AlamofireRequestBuilder to override the queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants