1
0
mirror of https://github.com/interviewstreet/go-jira.git synced 2025-12-13 23:25:52 +02:00

Add test cases for PostAttachment() and DownloadAttachment(). Fix PostAttachment() to handle response as a JSON array of Attachments. Add Author *Assignee and Thumbnail definition to Attachment structure. Clarify comments on DoNoClose() call

This commit is contained in:
Jason O'Broin
2016-05-25 00:04:23 -07:00
parent ca7e4dedd4
commit 3335a9c77f
3 changed files with 98 additions and 10 deletions

View File

@@ -143,7 +143,7 @@ func (c *Client) Do(req *http.Request, v interface{}) (*http.Response, error) {
// Do sends an API request and returns the API response.
// The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred.
// The caller needs to call Body.Close when the response has been handled
// The caller is expected to consume the Body, and needs to call Body.Close when the response has been handled
func (c *Client) DoNoClose(req *http.Request, v interface{}) (*http.Response, error) {
resp, err := c.client.Do(req)
if err != nil {