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

docs: add responseDictionary to HTTPClient documentation #14101

Merged
merged 4 commits into from
Sep 5, 2024

Conversation

m1ga
Copy link
Contributor

@m1ga m1ga commented Aug 31, 2024

fixes #14096

Test

var client = Ti.Network.createHTTPClient({
    onload : function(e) {
        console.log(this.responseDictionary);
    },
    onerror : function(e) {},
    timeout : 5000  // in milliseconds
});
client.open("GET", "https://httpbin.org/json");
client.send();

tested on Android and iOS

Copy link
Contributor

@cb1kenobi cb1kenobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks!

@cb1kenobi
Copy link
Contributor

Wait a sec, I'm confused... is it responseDictionary or responseDict?

I'm also confused as to why the property isn't just called json.

@m1ga m1ga changed the title docs: add responseDict to HTTPClient documentation docs: add responseDictionary to HTTPClient documentation Aug 31, 2024
@m1ga
Copy link
Contributor Author

m1ga commented Aug 31, 2024

oh, sorry. It is responseDictionary


it was added 6 years ago #9893 :) [TIMOB-25533] Implement responseDictionary but as it isn't documented I guess no one is using it and just uses JSON.parse()

@cb1kenobi cb1kenobi merged commit d98f6a6 into master Sep 5, 2024
6 checks passed
@cb1kenobi cb1kenobi deleted the docsHttpclient branch September 5, 2024 15:02
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

Successfully merging this pull request may close these issues.

Undocumented responseDictionary attribute for HTTPClient Object
2 participants