Open czoIg opened 2 years ago
Hi! After making PUT request, response status code is 204 (no content), which is valid response, but go-redmine treats it as error and tries decode content body which is empty string. Here it is: https://github.com/mattn/go-redmine/blob/b2dd06078c5c918c133727c594e4f6f7364263b0/issue.go#L225
In Redmine docs there are some pages that describes 204 code as confirmation that requested change was made: https://www.redmine.org/projects/redmine/wiki/Rest_IssueCategories#PUT https://www.redmine.org/projects/redmine/wiki/Rest_Memberships#PUT https://www.redmine.org/projects/redmine/wiki/Rest_TimeEntries#Updating-a-time-entry etc.
Okay, could you please send me pull-request like below?
res.StatusCode / 100 == 2
Thanks for fast reply. PR is done: Ref #52
Hi! After making PUT request, response status code is 204 (no content), which is valid response, but go-redmine treats it as error and tries decode content body which is empty string. Here it is: https://github.com/mattn/go-redmine/blob/b2dd06078c5c918c133727c594e4f6f7364263b0/issue.go#L225
In Redmine docs there are some pages that describes 204 code as confirmation that requested change was made: https://www.redmine.org/projects/redmine/wiki/Rest_IssueCategories#PUT https://www.redmine.org/projects/redmine/wiki/Rest_Memberships#PUT https://www.redmine.org/projects/redmine/wiki/Rest_TimeEntries#Updating-a-time-entry etc.