Code example for HttpRequestExecutor

Methods: execute

0
	 * @return JSONデータ 
	 * @throws Exception 
	 */ 
	public static JSONObject getPostInfo(String aid) throws Exception {
		// TODO 投稿情報取得するぞ 
		HttpRequestExecutor executor = new HttpRequestExecutor();
		HttpResponse execute = executor.execute(new HttpGet(BASE_URL + aid
				+ "/json"), null, null); 
		ByteArrayOutputStream outstream = new ByteArrayOutputStream();
		execute.getEntity().writeTo(outstream);
		String string = outstream.toString(execute.getEntity()
				.getContentEncoding().getValue());
		JSONObject json = new JSONObject(string);
 
		return json;
	} 
 
	/** 
	 * 指定されたIDを持つ投稿の音声データをバイナリで取得する 
	 *  
Connect your IDE to all the code out there  Get Codota for Java