Hello all !
I started to work with Google Health API in C#. To begin, I just want
to get a user's profile like that :

            HealthService service = new HealthService("exampleCo-
exampleApp-1");
            service.setUserCredentials(login, password);
            HealthQuery profileQuery = new HealthQuery("https://
www.google.com/health/feeds/profile/default");
            profileQuery.Digest = true;

            try
            {
                HealthFeed feed = service.Query(profileQuery);

                foreach (HealthEntry entry in feed.Entries)
                {
                    XmlNode ccr = entry.CCR;
                    if (ccr != null)
                    {

                        StringWriter sw = new StringWriter();
                        XmlTextWriter xw = new XmlTextWriter(sw);
                        xw.Formatting = Formatting.Indented;
                        ccr.WriteTo(xw);
                        Console.WriteLine(HttpUtility.HtmlEncode
(sw.ToString()));

                    }
                }
            }
            catch (GDataRequestException ev)
            {
                Console.WriteLine("Error: "+ ev);
            }
        }

There is an error on " HealthFeed feed = service.Query(profileQuery);"
==> Google.GData.Client.GDataRequestException: Execution of request
failed: https://www.google.com/health/feeds/profile/default?digest=true
---> System.Net.WebException: (500) Internal server error.

Is there a problem with the code? Any suggestions? Thanks.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Health Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/googlehealthdevelopers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to