[MOD-2379] Ti.URLSession module: expose dataTask equivalent API which is available in native iOS.
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-02-01T20:15:00.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Ti.URLSession 2.2.0 |
Components | UrlSession |
Labels | n/a |
Reporter | Jebun Naher |
Assignee | Hans Knöchel |
Created | 2017-12-12T06:45:05.000+0000 |
Updated | 2018-08-06T17:49:36.000+0000 |
Description
This is an Enterprise customer requirement. The original scenario is as below:
We have a requirement where we need to upload a document to the service along with some data like document ID , document Name, document Category. When we have gone through the ti.URLSession module we have seen the methods like uploadTask where we are only able to pass the input as blob/image but not the additional information as mentioned above.
In the native iOS implementation we have seen the methods like dataTask and did not find the equivalent API call in Titanium module. Can you please provide a solution for this scenario or can expose the equivalent API to dataTask which is available in native iOS.
I've done a [pull request](https://github.com/appcelerator-modules/ti.urlsession/pull/13) to support this last week. Does it resolve the request? If not, what additional API's should be exposed?
[~hknoechel] It PR looks good to me. Will forward customer the pre-release see if it fits customer's request.
[~hknoechel] Is there any update here?
Just merged the PR and did some additional changes, so the
sessioncompleted
event actually gets called. The new release (2.2.0) can be found on the [Github page](https://github.com/appcelerator-modules/ti.urlsession/releases/tag/v2.2.0). Full example:Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.