Update client.go

lets return here before we set success to be true
return if error is found converting payload to bytes
Merge pull request #2 from garethstokes/patch-1

Update client.go