Skip to content

Commit

Permalink
Merge pull request #1 from Lord-Ofada/master
Browse files Browse the repository at this point in the history
Added support for 201 response codes as some endpoints return that.
  • Loading branch information
jcobhams authored Mar 5, 2021
2 parents c1380d8 + a201ceb commit 658ac3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gomono.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (g *gomono) makeRequest(method, url string, body io.Reader, headers []heade
return err
}

if resp.StatusCode == 200 {
if resp.StatusCode == 200 || resp.StatusCode == 201 {
err = json.Unmarshal(b, responseTarget)
if err != nil {
return err
Expand Down

0 comments on commit 658ac3d

Please sign in to comment.