Best code examples for Android HttpPost class (org.apache.http.client.methods.HttpPost)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android HttpPost class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android HttpPost examples from Open Source projects
This code example shows how to use the following methods: setEntity, addHeader, setParams
49:	HttpPost request       = new HttpPost(parameters.getMmsc()); 
-
54:	request.setEntity(entity); 
55:	request.setParams(client.getParams()); 
56:	request.addHeader("Accept", "*/*, application/vnd.wap.mms-message, application/vnd.wap.sic"); 
-
58:	request.addHeader("x-wap-profile", "http://www.google.com/oha/rdf/ua-profile-kila.xml"); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods:
91:	response = httpclient.execute(new HttpPost(cookieReadURL.toURI() + "CookieReadServlet")); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: setEntity, setHeader
70:	HttpPost request = new HttpPost(PathUtility.appendPathToUri(this.m_WazServiceBaseUri, LOGIN_PATH)); 
71:	request.setEntity(new ByteArrayEntity(loginXmlString.getBytes())); 
72:	request.setHeader("Content-Type", "text/xml"); 
-
74:	HttpResponse httpResponse = client.execute(request); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setHeaders
422:	HttpEntityEnclosingRequestBase request = new HttpPost(url); 
-
424:	if(headers != null) request.setHeaders(headers); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEntity, addHeader
40:	HttpPost httppost = new HttpPost(url); 
41:	httppost.addHeader("Authorization", headerValue); 
42:	httppost.setEntity(new FileEntity(new File(filePath), "application/x-sqlite3")); 
43:	HttpResponse response = httpclient.execute(httppost); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEntity, setHeader
34:	HttpPost post = new HttpPost(url); 
35:	post.setHeader("Content-Type", "application/json"); 
-
40:	post.setEntity(se); 
-
42:	return httpclient.execute(post); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEntity, setHeader
305:	HttpPost post = new HttpPost(url); 
-
310:	post.setHeader("Content-Type", MULTIPART_FORM_DATA + "; boundary=" + BOUNDARY); 
-
325:	post.setEntity(formEntity); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEntity
78:	post.setEntity(postEntity); 
-
80:	CloseableHttpResponse response = client.execute(post); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEntity
113:	HttpPost post = new HttpPost("http://localhost:9998/controller/router"); 
-
124:	post.setEntity(postEntity); 
-
126:	response = client.execute(post); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEntity, setParams
309:	HttpPost post = new HttpPost("http://twitter.com/statuses/update.json"); 
-
312:	post.setEntity(new UrlEncodedFormEntity(out, HTTP.UTF_8)); 
313:	post.setParams(getParams()); 
-
315:	mConsumer.sign(post); 
316:	String response = mClient.execute(post, new BasicResponseHandler()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setHeader
288:	HttpPost httpPost = new HttpPost(mPostUrl); 
289:	httpPost.setHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8"); 
290:	httpPost.setHeader("AT", "1"); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
59:	HttpPost request = new HttpPost(endpointUrl); 
60:	return new HttpRequestAdapter(request); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEntity, abort, setHeader
102:	final HttpPost postRequest = new HttpPost(url); 
-
105:	postRequest.setEntity(entity); 
106:	postRequest.setHeader("Accept", "application/json"); 
107:	postRequest.setHeader("Content-Type", "application/json"); 
-
117:	postRequest.abort(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEntity
97:	HttpPost post = new HttpPost(feedUrl); 
98:	post.setEntity(entity); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEntity
137:	post.setEntity(postEntity); 
-
139:	CloseableHttpResponse response = client.execute(post); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: addHeader, addHeader
88:	post.addHeader("Host", "play.google.com"); 
89:	post.addHeader("Connection", "keep-alive"); 
90:	post.addHeader("Content-Type", "application/json; charset=utf-8"); 
-
93:	post.addHeader("X-GWT-Permutation", "EC203CA4CDFF1F0285B065B554E0D784"); 
94:	post.addHeader("Origin", "https://play.google.com"); 
95:	post.addHeader("X-GWT-Module-Base", "https://play.google.com/apps/publish/v2/gwt/"); 
96:	post.addHeader("Referer", "https://play.google.com/apps/publish/v2/?dev_acc=" 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: setEntity
167:	HttpPost post = new HttpPost("http://localhost:9998/controller/router"); 
-
182:	post.setEntity(postEntity); 
-
184:	response = client.execute(post); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEntity, getParams
351:	HttpPost post = new HttpPost(request); 
352:	post.setEntity(new UrlEncodedFormEntity(bodyParams, HTTP.UTF_8)); 
353:	post.getParams().setBooleanParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, false); 
354:	httpOauthConsumer.sign(post); 
355:	HttpResponse response = client.execute(post); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setEntity
56:	HttpPost httppost = new HttpPost(postto); 
57:	httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); 
58:	httpclient.execute(httppost); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEntity
137:	post.setEntity(postEntity); 
-
139:	CloseableHttpResponse response = client.execute(post); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEntity
120:	HttpPost httppost = new HttpPost(PUSH_URL); 
-
129:	httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs, HTTP.UTF_8)); 
-
132:	httpclient.execute(httppost); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEntity, addHeader, setHeader
120:	HttpPost request = new HttpPost(url); 
121:	request.setEntity(new UrlEncodedFormEntity(params, HTTP.UTF_8)); 
122:	request.addHeader("Content-Type", "application/x-www-form-urlencoded"); 
-
124:	request.setHeader("Authorization", "Basic "+ getAuthHash()); 
-
127:	getConsumer().sign(request);  //OAuth signing 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setEntity
219:	HttpPost httpPost = new HttpPost(mRemoteUrl); 
-
228:	httpPost.setEntity(new UrlEncodedFormEntity(params, HTTP.UTF_8)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setEntity, setHeader
46:	HttpPost post = new HttpPost("http://localhost:9998/controller/router"); 
-
52:	post.setEntity(postEntity); 
53:	post.setHeader("Content-Type", "application/json; charset=UTF-8"); 
-
55:	response = client.execute(post); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEntity, setHeader
54:	HttpPost post = new HttpPost(url); 
-
70:	post.setHeader("Content-type", "application/x-www-form-urlencoded"); 
71:	post.setHeader("Accept", "text/plain"); 
72:	post.setEntity(new UrlEncodedFormEntity(nameValuePairs)); 
-
74:	response = client.execute(post); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setEntity
74:	post.setEntity(postEntity); 
-
76:	CloseableHttpResponse response = client.execute(post); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEntity, setHeader
111:	HttpPost request = new HttpPost(uri); 
112:	request.setEntity(new ByteArrayEntity(payload.toString().getBytes("UTF8"))); 
113:	request.setHeader("Accept", "application/json"); 
114:	request.setHeader("Content-type", "application/json"); 
115:	HttpResponse response = client.execute(request); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: toString, setEntity, setParams
118:	HttpPost request = new HttpPost(serviceUri + methodUri); 
-
124:	request.setParams(params); 
-
135:	request.setEntity(entity); 
-
141:	HttpResponse response = httpClient.execute(request); 
-
143:	Log.d("json-rpc", "Request Package :" + request.toString()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEntity, setHeader
55:	HttpPost post = new HttpPost("http://localhost:9998/controller/router"); 
-
59:	post.setEntity(postEntity); 
60:	post.setHeader("Content-Type", "application/json; charset=UTF-8"); 
-
62:	response = client.execute(post); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEntity, addHeader, getParams
247:	HttpPost httppost = new HttpPost(url); 
-
250:	ConnRouteParams.setDefaultProxy(httppost.getParams(), host); 
-
254:	httppost.addHeader("Referer", referer); 
-
259:	httppost.setEntity(entity); 
-
262:	HttpResponse response = client.execute(httppost); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: addHeader
77:	HttpPost post = new HttpPost(alfrescoURL + SERVICE_RESET_ON_SUBMIT_REFRESH_WEB_SCRIPTS); 
-
80:	post.addHeader(new BasicScheme().authenticate(defaultcreds, post)); 
-
82:	post.addHeader("Content-Type", FORM_URL_ENCODED_CONTENT_TYPE + "; charset=UTF-8"); 
83:	String executeRequest = AlfrescoHotDeployerHelper.executeRequest(httpclient, post); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setEntity, addHeader, setParams
105:	HttpPost request = new HttpPost(serviceUri); 
-
111:	request.setParams(params); 
-
115:	request.addHeader("X-GEOREMINDME-SESSION", sessionId); 
-
126:	request.setEntity(entity); 
-
132:	HttpResponse response = httpClient.execute(request); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setEntity
74:	post.setEntity(postEntity); 
-
76:	CloseableHttpResponse response = client.execute(post); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEntity
92:	HttpPost httppost = new HttpPost("http://cyanogenmodstats.appspot.com/submit"); 
-
101:	httppost.setEntity(new UrlEncodedFormEntity(kv)); 
102:	httpclient.execute(httppost); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEntity, setHeader
45:	HttpPost post = new HttpPost("http://localhost:9998/controller/router"); 
-
51:	post.setEntity(postEntity); 
52:	post.setHeader("Content-Type", "application/json; charset=UTF-8"); 
-
54:	response = client.execute(post); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEntity
73:	final HttpPost request = new HttpPost(url); 
-
78:	request.setEntity(requestEntity); 
-
80:	final HttpResponse response = httpClient.execute(request); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setHeaders
431:	HttpEntityEnclosingRequestBase request = new HttpPost(url); 
-
433:	if (headers != null) request.setHeaders(headers); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setEntity, setHeader
25:	HttpPost post = new HttpPost(url); 
-
27:	post.setEntity(entity); 
28:	post.setHeader("Accept", "application/json"); 
29:	post.setHeader("Content-type", "application/json"); 
30:	client.execute(post, new BasicResponseHandler()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setEntity, addHeader, getParams
442:	HttpPost post = new HttpPost(request); 
443:	post.setEntity(new UrlEncodedFormEntity(bodyParams, HTTP.UTF_8)); 
444:	post.getParams().setBooleanParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, false); 
445:	consumer.sign(post); 
446:	post.addHeader("Content-Type", contentType); 
447:	HttpResponse response = client.execute(post); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setEntity, addHeader, getHeaders
212:	HttpPost httpRequest = new HttpPost(url); 
-
215:	httpRequest.addHeader("Cookie", "JSESSIONID=" + jsessionid); 
216:	Log.d("Network", "Added header: " + httpRequest.getHeaders("Cookie")[0].toString()); 
-
220:	httpRequest.setEntity(entity); 
-
222:	HttpResponse httpResponse = client.execute(httpRequest); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEntity, addHeader
54:	HttpPost httpPost = new HttpPost(this.url); 
-
58:	httpPost.addHeader("Authorization", "Basic " + basic_auth); 
-
62:	httpPost.setEntity(input); 
-
64:	response = client.execute(httpPost); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setEntity, addHeader
51:	HttpPost request = new HttpPost(url); 
-
64:	request.addHeader(header); 
-
67:	request.setEntity(entity); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setEntity, setHeader
250:	HttpPost httpPost = new HttpPost(uploadURL); 
251:	httpPost.setHeader("User-Agent", "SimpleCV Mobile Camera"); 
-
258:	httpPost.setEntity(entity); 
-
260:	HttpResponse httpResponse = httpclient.execute(httpPost); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: addHeader, getParams
89:	postMethod = new HttpPost(uri); 
90:	postMethod.addHeader("Content-Type", "text/xml"); 
-
95:	httpParams = postMethod.getParams(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setEntity, addHeader
45:	HttpPost req = new HttpPost(uri); 
-
48:	req.setEntity(new StringEntity("email=restaurant.manager@youfood.com&pass=password")); 
-
50:	req.addHeader("Content-Type", "application/x-www-form-urlencoded"); 
51:	req.addHeader("Accept", "*/*"); 
-
53:	HttpResponse resp = client.execute(req); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setEntity, setHeader
152:	final HttpPost request = new HttpPost(requestUrl); 
153:	request.setHeader("Accept", "application/json"); 
154:	request.setEntity(body); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setEntity, setParams
57:	HttpPost request = new HttpPost(serviceUri); 
-
62:	request.setParams(params); 
-
73:	request.setEntity(entity); 
-
79:	HttpResponse response = httpClient.execute(request); 
Full Snippet Info
6
CodeRank
Related Android HttpPost Questions & Answers:
Other Android HttpPost Examples
4:				// defaultHttpClient
5:				DefaultHttpClient httpClient = new DefaultHttpClient();
6:				HttpPost httpPost = new HttpPost(url);
7:	
8:				HttpResponse httpResponse = httpClient.execute(httpPost);
-
4:				// defaultHttpClient
5:				DefaultHttpClient httpClient = new DefaultHttpClient();
6:				HttpPost httpPost = new HttpPost(url);
7:	
8:				HttpResponse httpResponse = httpClient.execute(httpPost);

Read More

27:			HttpClient httpClient = new DefaultHttpClient();
28:			// Creating HTTP Post
29:			HttpPost httpPost = new HttpPost(
30:					"http://www.example.com/login");
31:	
-
27:			HttpClient httpClient = new DefaultHttpClient();
28:			// Creating HTTP Post
29:			HttpPost httpPost = new HttpPost(
30:					"http://www.example.com/login");
31:

Read More

50:				// Checking http request method type
51:				if (method == POST) {
52:					HttpPost httpPost = new HttpPost(url);
53:					// adding post params
54:					if (params != null) {
-
50:				// Checking http request method type
51:				if (method == POST) {
52:					HttpPost httpPost = new HttpPost(url);
53:					// adding post params
54:					if (params != null) {

Read More

See Code Examples for Android HttpPost Methods: