Code example for ClientProtocolException

Methods: toString

0
 
			//todo: verify 201 code (created) 
			Log.d(TAG, response.toString());
 
		} catch (ClientProtocolException e) {
			Log.e(TAG, e.toString());
		} catch (IOException e) {
			Log.e(TAG, e.toString());
		} catch (JSONException e) {
			Log.e(TAG, e.toString());
		} 
	} 
 
	public String readTimesheetEntries() {
		StringBuilder builder = new StringBuilder();
		HttpClient client = new DefaultHttpClient();
		HttpGet httpGet = new HttpGet(mServer);
		httpGet.setHeader("Content-Type", "application/json; charset=utf-8");
 
		byte[] encodeString = Base64.encode((mUserName + ":" + mPassword).getBytes(), Base64.NO_WRAP);
		String d = new String(encodeString);