check http status before decode json. This fixes #11
Merge https://github.com/coreos/go-etcd
Merge pull request #15 from xiangli-cmu/master

check http status before decode json. This fixes #11