1
0
Fork 0
forked from forgejo/forgejo

Update gitea/sdk vendor

This commit is contained in:
Kim "BKC" Carlbäcker 2016-11-29 09:09:17 +01:00
parent f364522468
commit 57dc9efaae
26 changed files with 301 additions and 33 deletions

View file

@ -13,6 +13,7 @@ import (
"strings"
)
// Version return the library version
func Version() string {
return "0.12.3"
}
@ -88,3 +89,13 @@ func (c *Client) getParsedResponse(method, path string, header http.Header, body
}
return json.Unmarshal(data, obj)
}
func (c *Client) getStatusCode(method, path string, header http.Header, body io.Reader) (int, error) {
resp, err := c.doRequest(method, path, header, body)
if err != nil {
return -1, err
}
defer resp.Body.Close()
return resp.StatusCode, nil
}