Code example for HttpPut

Methods: setEntitysetHeader

	public String put(String uri, String data) throws UnknownHostException {
		// Prepare a request object 
		HttpPut httpPut = new HttpPut(uri);
		try { 
			// The default http content charset is ISO-8859-1, JSON requires UTF-8 
			httpPut.setEntity(new StringEntity(data, "UTF-8"));
		} catch (UnsupportedEncodingException e1) {
			return null; 
		httpPut.setHeader("Content-Type", "application/json");
		// Do not handle redirects, we need to sign the request again as the old signature will be invalid 
		HttpResponse response = execute(httpPut);
		return parseResponse(response);
	public void saveConfiguration() {