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

Mapping dynamic response from API #304

Open
avjiang opened this issue Apr 7, 2020 · 0 comments
Open

Mapping dynamic response from API #304

avjiang opened this issue Apr 7, 2020 · 0 comments

Comments

@avjiang
Copy link

avjiang commented Apr 7, 2020

Hi, great library so far!

I have been using this library for some time, and it really helped me so much throughout this time.
I have a question, can we dynamically read the JSON response?

For example, the success API call will return an array, thus I am using responseArray function. However, if there is something wrong with the request, the API will return an object, with errorCode and errorMessage key. For now, since I don't know how to cater this condition, I can only hardcode the error message.

Is there any function to solve this issue? Thanks!

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