Skip to main content

Don Thorp's Library tagged android   View Popular, Search in Google

Dec
2
2009

"Ok, I feel silly coming back to answer my own question, but I figured it out, for anyone who might want to use httpclient 4.x:
The important thing is that your HttpPost must use the BasicHttpParams and can’t have useExpectContinue set to true. This is what caused a 417 Expectation Failed response for me.

Like this:
// >> Set Hostname
hostname = “twitter.com”;
// >> HttpParams
HttpParams params = new BasicHttpParams();
// NOTE This following line cannot set true or you get error 417 Expectation Failed.
HttpProtocolParams.setUseExpectContinue(params, false);
HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
standardHttpPostParams = params;
// >> AuthScope
authScope = new AuthScope(hostname, 80);
// >> Credentials
credentials = new UsernamePasswordCredentials(username, password);
// >> Client
client = new DefaultHttpClient(getStandardPostParams());
applyCredentials(client);"

twitter http android

"Android will run on many different devices in many different regions, and used by speakers of many different languages. To reach the most users in the most effective way, developers will want to localize their applications to the native languages spoken by the users they wish to reach. This document explains how to localize an Android application.
"

android l10n

1 - 20 of 49 Next › Last »
Showing 20 items per page

Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »

Join Diigo
Move to top