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

pass response data to completionHandler even upon error #27

Closed
wants to merge 3 commits into from

Conversation

brunomacf
Copy link
Contributor

Upon server error some information about error itself may come in data field of response. This change passes this data even upon error! In this case the client code can check for error in this way:

http.POST("login", parameters: params, completionHandler: {(response, error) in 
    if(error != nil) {
        println(response) // print response data that may describe the error.
    }
})

@cvasilak
Copy link
Contributor

cvasilak commented Jan 7, 2015

Hi @brunomacf thank you for these contributions!

Can I ask and will be easier for us if you can separate the last two commits in separate PR's cause it touches different parts and we can comment on it separately.

thanks again!

@corinnekrych
Copy link
Contributor

Thanks @brunomacf for your contribution, I've created a separate PR #31 for your initial commit brunomacf@5e2b97b

I'm closing this PR in favor of the other one.
Regarding other commits could you explain a bit more the problem you want to solve and issue another PR.

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