private EtcdResult put ( String key , List < BasicNameValuePair > data , Map < String , String > params , int [ ] expectedHttpStatusCodes , int ... expectedErrorCodes ) throws EtcdClientException { URI uri = buildUriWithKeyAndParams ( key , params ) ; HttpPut httpPut = new HttpPut ( uri ) ; UrlEncodedFormEntity entity = new UrlEncodedFormEntity ( data , Charsets . UTF_8 ) ; httpPut . setEntity ( entity ) ; return syncExecute ( httpPut , expectedHttpStatusCodes , expectedErrorCodes ) ; }
The basic put operation