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

[TIMOB-17891] Added error message when using invalid TLS #6674

Merged
merged 1 commit into from Mar 9, 2015

Conversation

ashcoding
Copy link
Contributor

Jira: https://jira.appcelerator.org/browse/TIMOB-17891
Sample code.

 var url = "https://www.google.com";
 var client = Ti.Network.createHTTPClient({
     // function called when the response data is available
     onload : function(e) {
         Ti.API.info("Received text: " + this.responseText);
         alert('success');
     },
     // function called when an error occurs, including a timeout
     onerror : function(e) {
         Ti.API.debug(e.error);
         alert('error');
     },
     //tlsVersion : Ti.Network.TLS_VERSION_1_1,
     timeout : 5000  // in milliseconds
 });
//tlsVersion can be set here or above
 client.setTlsVersion(400);
 alert('tls :'+client.getTlsVersion());
 // Prepare the connection.
 client.open("GET", url);
 // Send the request.
 client.send();

@hieupham007
Copy link
Contributor

Code reviewed and functionally tested. Request accepted

hieupham007 added a commit that referenced this pull request Mar 9, 2015
[TIMOB-17891] Added error message when using invalid TLS
@hieupham007 hieupham007 merged commit eb6157c into tidev:master Mar 9, 2015
@ashcoding ashcoding deleted the TIMOB_17891_error_warning branch May 21, 2015 07:24
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.

None yet

2 participants