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-17566] Android: setting createHTTPClient properties autoRedirect ... #6532

Merged
merged 1 commit into from
Jan 6, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,15 @@ public void handleCreationDict(KrollDict dict)
if (hasProperty(TiC.PROPERTY_TIMEOUT)) {
client.setTimeout(TiConvert.toInt(getProperty(TiC.PROPERTY_TIMEOUT),0));
}


if (hasProperty(TiC.PROPERTY_AUTO_REDIRECT)) {
client.setAutoRedirect(TiConvert.toBoolean((getProperty(TiC.PROPERTY_AUTO_REDIRECT)),true));
}

if (hasProperty(TiC.PROPERTY_AUTO_ENCODE_URL)) {
client.setAutoEncodeUrl(TiConvert.toBoolean((getProperty(TiC.PROPERTY_AUTO_ENCODE_URL)),true));
}

//Set the securityManager on the client if it is defined as a valid value
if (hasProperty(PROPERTY_SECURITY_MANAGER)) {
Object prop = getProperty(PROPERTY_SECURITY_MANAGER);
Expand Down
10 changes: 10 additions & 0 deletions android/titanium/src/java/org/appcelerator/titanium/TiC.java
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,16 @@ public class TiC
*/
public static final String PROPERTY_AUTOROTATE = "autorotate";

/**
* @module.api
*/
public static final String PROPERTY_AUTO_REDIRECT = "autoRedirect";

/**
* @module.api
*/
public static final String PROPERTY_AUTO_ENCODE_URL = "autoEncodeUrl";

/**
* @module.api
*/
Expand Down