For Example, I have a document in my CouchDB database that holds two fields "password" and "username". This is the URL for my document:http://127.0.0.1:5984/_utils/document.html?sgram/fdcfc14940fbaa0d86674046ce005107 I want to retrieve the value of these fields from that specific document in CouchDB and parse it in Xcode. I tried using http-get but it just returns the entire page source.
Asked
Active
Viewed 771 times
1 Answers
1
You want to make a request to this endpoint
http://127.0.0.1:5984/sgram/fdcfc14940fbaa0d86674046ce005107
For a json response from couchdb just don't include _utils/document.html
in between. If you do it will give you back the futon html page.

Akshat Jiwan Sharma
- 15,430
- 13
- 50
- 60
-
I also have another question regarding this topic,is it possible to use http-post in Xcode to modify the document too?If so,how? – Cheese Lord Jun 04 '15 at 05:33
-
I am not familiar with xcode but [this](http://stackoverflow.com/questions/2346893/tutorials-for-using-http-post-and-get-on-the-iphone-in-objective-c) seems to have a good overview on making http get and post requests with it. If you are new to this try making post request with a simpler library like curl first to see if what you want to do works and then translate it into Xcode – Akshat Jiwan Sharma Jun 04 '15 at 07:21