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

It seems like asyncCompletionHandler is executed before download task is done #125

Open
marsha97 opened this issue Jan 10, 2020 · 1 comment

Comments

@marsha97
Copy link

i tried this

Just.get(url, params: params, headers: headers) { response in
       if response.status.code == 200 {
              let json = JSON(response.json!) 
              .......
      }
}

we managed, to log the content.
response.json returns nil because it is not in full response.
sample:

{
    order: {
         'id':  1,
         'notes': ''
    }

swift 5
xcode 11.2.1
we can't reproduce this. Only happens in production
Thanks

@marsha97
Copy link
Author

marsha97 commented Feb 6, 2020

well, it is probably so. it is not occuring in past XCode, but it become so frequent in XCode 11.2.1. I think asyncCompletionHandler is really meant to be executed this way, judging from the name. I will try to look for another way

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

No branches or pull requests

1 participant