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

Add missing @discardableResult #2338

Merged
merged 1 commit into from
Oct 30, 2017
Merged

Add missing @discardableResult #2338

merged 1 commit into from
Oct 30, 2017

Conversation

rastersize
Copy link
Contributor

Goals ⚽

  • Align request(_:) with the other methods.

Implementation Details 🚧

All the other request, download, upload and so on methods are annotated with @discardableResult. This changes makes sure that method can be used for fire-and-forget calls.

@jshier
Copy link
Contributor

jshier commented Oct 30, 2017

Thanks for the PR! Cheers! 🍻

@jshier jshier merged commit c4b4bb4 into Alamofire:master Oct 30, 2017
@jshier jshier added this to the 4.6.0 milestone Dec 4, 2017
@rastersize rastersize deleted the patch-1 branch March 21, 2018 21:47
@jpdutoit
Copy link

jpdutoit commented Oct 1, 2020

Should this be reverted in the latest version? It looks like the request is being released automatically if no response handler is added...

@jshier
Copy link
Contributor

jshier commented Oct 1, 2020

We probably should, but it would need a major version revision. We'll have to see how the next version's APIs shake out and reevaluate.

@jpdutoit
Copy link

jpdutoit commented Oct 2, 2020

Ok. In our case this caused a bunch of problems when our fire-and-forget API calls stopped firing after updating Alamofire.

@jshier
Copy link
Contributor

jshier commented Oct 2, 2020

To be clear, that behavioral change is intentional, as Requests no longer start until a response handler has been added or resume() has been called. That's true whether or not the instance is retained.

@jpdutoit
Copy link

jpdutoit commented Oct 5, 2020

Thanks for the clarification. I must have missed it in the release notes

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

Successfully merging this pull request may close these issues.

3 participants