java - How to setup administrators in Couchdb via Apache's HttpClient (given a curl example) -


so working on couchdb gui toolbox easier maintaining setting couchdb on android, futon quite uncomfortable on small mobile device.

i wanted stick "org.apache.http.client.*" packages working out quite until wanted setup administrators..

with commandline tool "curl" works charm:

curl -x put http://127.0.0.1:5984/_config/admins/username -d '"password"' 

but keep on having big problems translating "org.apache.http.client.methods.httpput()" method.

any appreciated.

defaulthttpclient client = new defaulthttpclient();  httpput put = new httpput("http://127.0.0.1:5984/_config/admins/username"); put.setentity(new stringentity("\"password\"")); client.execute(put); 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -