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

Kinvey #75

Closed
1 of 3 tasks
PanayotCankov opened this issue Jul 21, 2017 · 4 comments
Closed
1 of 3 tasks

Kinvey #75

PanayotCankov opened this issue Jul 21, 2017 · 4 comments

Comments

@PanayotCankov
Copy link
Contributor

PanayotCankov commented Jul 21, 2017

We have to raise the priority of some issues to enable file upload integration with Kinvey:

In general this includes delivering headers both on success and error, result and to unify the events.

@Cayan
Copy link

Cayan commented Jul 21, 2017

I'm happy to see that this will improve this plugin

@gprodanov
Copy link

I'll try to list what confused and impeded me while working on the integration with Kinvey:

On Android:

  • "error" is fired with a Java object in eventData.error - needs java code
  • "complete" has a "response" property, which is a Java class, representing the server's response. It has all necessary data, but Java code needs to be written in order to obtain it and it isn't all that straightforward
  • "responded" has the body of the server response as a string, but without 'content-type' header you can't parse it properly, unless you know what you are getting and you cannot tell if it's a success without the status code

On iOS:

  • "error" is fired with a native object in eventData.error - needs native code
  • "complete" doesn't have a "response" property - you do not have any data about the response
  • "responded" has "data" property as a string, but I haven't seen what it contains and when this event is fired

It would be nice to unify the behavior of the plugin over the two platforms and to avoid any use of native code. And to be able to access everything a server response might contain.

@darxmac
Copy link

darxmac commented Feb 21, 2018

Any idea if these things are still being considered ?

@lini
Copy link
Contributor

lini commented Feb 23, 2018

The complete event includes the native response object for both Android and iOS. Accessing the data in the response (e.g. headers) is not trivial, because you have to know how to work with the respective native objects NSHTTPURLResponse on iOS and ServerResponse on Android. However, there is no need to write native code - NativeScript translates the native calls and will allow you to get the headers, response body, etc.

About #26 - the problem is explained in the issue and will cannot fixed in the plugin code.
About #59 - the issue is still open so anyone can submit a patch.

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

6 participants