Code example for BasicHeader

0
		HttpPost post = new HttpPost(url);
		post.setHeader("Content-Type", "application/json");
 
		try { 
		      ByteArrayEntity se = new ByteArrayEntity(json.getBytes());  
		      se.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE, "application/json"));
		      post.setEntity(se);
		       
		      return httpclient.execute(post);
		} 
		catch(Exception e){
			Logger.w("Failed to send request. " +  
		    		Log.getStackTraceString(e));
		} 
		 
		return null; 
	} 
 
	@Override 
	public EasyJSONObject fetchSettings() { 
Connect your IDE to all the code out there  Get Codota for Java