Version 2.1.0 of ti.urlsession has support for NSURLSessionUploadTask.
Once the NSURLRequest is completed, the `sessioncompleted` event is fired with a success status, because the request received it's response.
However, the response might have been a 401,still a success code would be set, because NSURLSessionUploadTask does not care for HTTP error statuses.
We might also want to handle the response code after the upload task is completed.
To do this we only need to add a delegate method from `NSURLSessionDataDelegate` and modify the sessioncompleted delegate.
I will make a PR with the required changes, which are adding:
and modify this other delegate method: