Best code examples for Android StringEntity class (org.apache.http.entity.StringEntity)

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

Android StringEntity examples from Open Source projects
This code example shows how to use the following methods:
80:	entity = new StringEntity(httpResponseBody); 
-
84:	httpResponse.setEntity(entity); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
318:	put.setEntity(new StringEntity(data)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
55:	response.setEntity(new StringEntity(uri)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getContentType
79:	entity = new StringEntity(postBody); 
-
86:	Header header = entity.getContentType(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setContentType
547:	entity = new StringEntity(body, CHARSET); 
-
552:	entity.setContentType(contentType); 
553:	request.setEntity(entity); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setContentType
43:	AbstractHttpEntity entity = new StringEntity("401 Unauthorized"); 
44:	entity.setContentType("text/plain"); 
45:	response.setEntity(entity); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
57:	StringEntity postEntity = new StringEntity("{\"action\":\"" + action + "\",\"method\":\"" + method 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setContentType
92:	return new StringEntity(content,UTF_8_ENCODING); 
-
108:	se.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, MIME_TYPE_JSON)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
207:	StringEntity outgoing = new StringEntity("No content"); 
208:	response.setEntity(outgoing); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods:
34:	stringdata = new StringEntity(l.getJSON()); 
-
40:	SimpleHttp.put(putURL, data); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods:
218:	entity = new StringEntity(data, DEFAULT_ENCODING); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods:
86:	when(request.getEntity()).thenReturn(new StringEntity("stuff")); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods:
26:	postEntity = new StringEntity(content); 
27:	((HttpPost) method).setEntity(postEntity); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods:
66:	r.setEntity(new StringEntity(request.getPayload().toString(), "UTF-8")); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setContentType
121:	StringEntity se = new StringEntity(contents); 
122:	se.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json")); 
-
124:	client.put(null, url, se, "application/json", handler); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods:
86:	when(response.getEntity()).thenReturn(new StringEntity("stuff")); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods:
260:	return params.getRawBody() == null ? null : new StringEntity(params.getRawBody(), HTTP.UTF_8); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setContentEncoding, writeTo
46:	StringEntity se = new StringEntity(outboundJStr); 
47:	se.setContentEncoding( 
-
50:	se.writeTo(out); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setContentType
539:	final StringEntity entity = new StringEntity(query); 
-
544:	entity.setContentType(mediaType != null ? mediaType.toString() : null); 
545:	request.setEntity(entity); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setChunked, setContentType
69:	StringEntity paramEntity = new StringEntity(postArg); 
70:	paramEntity.setChunked(false); 
71:	paramEntity.setContentType("application/x-www-form-urlencoded"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods:
55:	response.setEntity(new StringEntity(uri)); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setContentEncoding, setContentType
213:	StringEntity stringEntity = new StringEntity(os.toString(CHARSET)); 
-
216:	stringEntity.setContentType(MIME_TYPE); 
217:	stringEntity.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE, "application/json")); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setContentEncoding
89:	StringEntity original = new StringEntity("encoded stuff"); 
90:	original.setContentEncoding("x-gzip"); 
91:	response.setEntity(original); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setContentType
119:	se = new StringEntity(body, HTTP.UTF_8); 
120:	se.setContentType("application/json"); 
121:	delete.setEntity(se); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods:
29:	return new StringEntity(bodyContents(), "UTF-8"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setContentType
339:	StringEntity entity = new StringEntity(payload); 
-
341:	entity.setContentType("text/json"); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setContentEncoding
154:	s = new StringEntity(gson.toJson(positions[0])); 
155:	s.setContentEncoding("application/json"); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setContentType, getContent
206:	StringEntity s = new StringEntity(c); 
207:	System.out.println(s.getContent()); 
-
210:	s.setContentType("application/x-www-form-urlencoded"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setContentType
32:	input = new StringEntity(JSON); 
33:	input.setContentType("application/json"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: writeTo
89:	p_entity = new UrlEncodedFormEntity(pairs, "utf-8"); 
-
108:	p_entity.writeTo(os); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setContentType
27:	jsonEntity = new StringEntity(json); 
28:	jsonEntity.setContentType(JSONCONTENT); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: writeTo
98:	p_entity = new UrlEncodedFormEntity(pairs, "utf-8"); 
-
115:	p_entity.writeTo(os); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: writeTo
89:	p_entity = new UrlEncodedFormEntity(pairs, "utf-8"); 
-
108:	p_entity.writeTo(os); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: writeTo
89:	p_entity = new UrlEncodedFormEntity(pairs, "utf-8"); 
-
108:	p_entity.writeTo(os); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setContentType
70:	StringEntity entity = new StringEntity(jsonData, "UTF-8"); 
71:	entity.setContentType("application/json"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setContentType
107:	StringEntity entity = new StringEntity(gson); 
108:	entity.setContentType("application/json"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: writeTo
89:	p_entity = new UrlEncodedFormEntity(pairs, "utf-8"); 
-
108:	p_entity.writeTo(os); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setContentType
85:	StringEntity content = new StringEntity(json, "UTF-8"); 
86:	content.setContentType("application/json"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setContentType
174:	StringEntity reqEntity = new StringEntity(encodedJson); 
-
176:	reqEntity.setContentType("application/json"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setContentEncoding
65:	StringEntity s = new StringEntity(data); 
66:	s.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE, "application/json")); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setContentType
302:	StringEntity se = new StringEntity(json, "UTF-8"); 
303:	se.setContentType("application/json"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setContentEncoding
57:	StringEntity se = new StringEntity(json); 
58:	se.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE, 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setContentType
65:	StringEntity params = new StringEntity( 
-
67:	params.setContentType(CONTENTTYPE); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setContentType
170:	StringEntity entity = new StringEntity(wbo.toJSONObjectString(), ENTITY_CHARSET_NAME); 
171:	entity.setContentType(JSON_STREAM_TYPE + HTTP.CHARSET_PARAM + ENTITY_CHARSET_NAME); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setContentType
97:	entity = new StringEntity(params); 
98:	entity.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, contentType)); 
Full Snippet Info
4
CodeRank
Related Android StringEntity Questions & Answers:
See Code Examples for Android StringEntity Methods: