Click here to Skip to main content
15,894,460 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
HttpWebRequest request =
(HttpWebRequest)WebRequest.Create("http://localhost:8092/beer-sample/_all_docs");
                HttpWebResponse response =
(HttpWebResponse)request.GetResponse();

                if (response.StatusCode == HttpStatusCode.OK)
                {
                    Stream receiveStream = response.GetResponseStream();
                    StreamReader readStream = null;

                    if (response.CharacterSet == null)
                        readStream = new StreamReader(receiveStream);
                    else
                        readStream = new StreamReader(receiveStream,
Encoding.GetEncoding(response.CharacterSet));

                    string data = readStream.ReadToEnd();
                    dynamic json = JsonConvert.DeserializeObject(data);
                    textBox1.Text = json.ToString();
[Edit]Code block added[/Edit]
Posted
Updated 9-Mar-13 5:27am
v2
Comments
[no name] 9-Mar-13 11:33am    
This is just a code dump without a real question.
Sandeep Mewara 10-Mar-13 3:41am    
This is not a well framed question! We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Use the "Improve question" link to edit your question and provide better information.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900