all repos — honk @ e82bcc706bef1072376bce112dd1d3468c40df1c

my fork of honk

201 is an ok status too
Ted Unangst tedu@tedunangst.com
Thu, 18 Apr 2019 16:09:10 -0400
commit

e82bcc706bef1072376bce112dd1d3468c40df1c

parent

9c2d2289ff615b4b08a39c88b72b6cfc4863860a

1 files changed, 6 insertions(+), 2 deletions(-)

jump to
M activity.goactivity.go

@@ -91,8 +91,12 @@ resp, err := client.Do(req)

if err != nil { return err } - if resp.StatusCode != 200 && resp.StatusCode != 202 { - resp.Body.Close() + resp.Body.Close() + switch resp.StatusCode { + case 200: + case 201: + case 202: + default: return fmt.Errorf("http post status: %d", resp.StatusCode) } log.Printf("successful post: %s %d", url, resp.StatusCode)