whazzmaster/fitgem-client

curl getting empty pages

Closed this issue · 4 comments

So I'm following the instructions on http://fitbitclient.com/guide/playing-with-the-fitgem-api. Great approach BTW.

Problem is, the curl doesn't get anything - no error, either.
$ curl https://gist.github.com/whazzmaster/5322902/raw/4439e2d577567d280856a2d77cef7b824a851cd1/test-fitgem.rb
~/fitgem-sandbox

Thanks for the heads-up- I received a few emails from folks that the client app (as well as this test script) are breaking in certain ways that suggest I need to update the OAuth support. From the problems I'm seeing it looks as if Fitbit has changed the way you auth to use the API.

Unfortunately, between work and family I may not have time to look into this for a few weeks. I'm happy to review and accept any pull requests anyone might have to address the problems, otherwise I will jump on it as soon as son's baptism, mother's day, and a work trip are done :(

meal commented

Fix is easy - just replace "gist.github.com" part with "gist.githubusercontent.com" since gist.github.com does 301 redirect to the gist.githubusercontent.com

Oh, nice, I'll update- thanks!

Adding -L to the curl command will make it follow 301s.