Thank you very much Paul, I tried to access the google health through a stand alone software. So I have to use ClientLogin. I tried to form the request with simple html and access ClientLogin I get the response as said in the document, that is really great. I tried the same through the script I get the 302 error. Please find the code below
local request = "<input type='text' name='accountType' value='HOSTED_OR_GOOGLE'/><input type='text' name='Email' value=' [email protected]'/><input type='text' name='Passwd' value='xxxxx'/><input type='text' name='service' value='health'/><input type='text' name='source' value='laird-APG-1'/>" local headers = { ["Content-length"] = request:len(), } local result, statuscode, hdrs, statusline = http.request{ url = "https://www.google.com/accounts/ClientLogin", method = "POST", headers = headers, source = ltn12.source.string(request), redirect = false, } Here redirect is set to false to avoid 301 and 302 error.(Ref : http://w3.impa.br/~diego/software/luasocket/http.html) ------------------------ Thanks & Regards, Jayakumar On Sat, Oct 23, 2010 at 4:10 AM, Paul (Google) <[email protected]> wrote: > Hi Jayakuman, > > Welcome to the Health Developers' Forum! > > If there isn't existing Lua code available for connection to Google > Health, you'll probably want to start by reading the "feeds" and > "protocol" sections of the Health API docs. These should help you to > understand what HTTP requests Health supports and how the request and > response contents are structured. > > http://code.google.com/apis/health/docs/2.0/reference.html#Feeds > http://code.google.com/apis/health/docs/2.0/developers_guide_protocol.html > > Paul (Google) > > > On Oct 20, 11:50 pm, Jayakumar <[email protected]> wrote: > > Hi all, > > I want to send my health details to my google health account. I am new to > > this. I have an option to use only lua scripting. Can any one help me how > to > > do it. > > > > ------------------------ > > Thanks & Regards, > > Jayakumar > > -- > 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]<googlehealthdevelopers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/googlehealthdevelopers?hl=en. > > -- 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.
