You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to raise the issue from #109 again. It was closed with content type autodetection, but there are still 2 problems with that: a) http.DetectContentType() does not detect every MIME type and b) SetFile() and SetFileReader() are written to deal specifically with files, and if you're trying to add some custom data with them, its rather awkward and limited. So instead of patching those functions like @gh0st42 did originally, I introduced a new type and supporting functions to solve the problem. Hope my suggestion is good enough to merge it, or at least build upon it. Here's the PR I made: #129.
PS: I'm writing a Go wrapper library for GLPI REST API and to upload a file it requires JSON encoded metadata as part of multipart request, that's the reason for this.
PPS: And finally let me say I really love Resty! Its awesome, powerful and easy to use.
The text was updated successfully, but these errors were encountered:
I'd like to raise the issue from #109 again. It was closed with content type autodetection, but there are still 2 problems with that: a)
http.DetectContentType()
does not detect every MIME type and b)SetFile()
andSetFileReader()
are written to deal specifically with files, and if you're trying to add some custom data with them, its rather awkward and limited. So instead of patching those functions like @gh0st42 did originally, I introduced a new type and supporting functions to solve the problem. Hope my suggestion is good enough to merge it, or at least build upon it. Here's the PR I made: #129.PS: I'm writing a Go wrapper library for GLPI REST API and to upload a file it requires JSON encoded metadata as part of multipart request, that's the reason for this.
PPS: And finally let me say I really love Resty! Its awesome, powerful and easy to use.
The text was updated successfully, but these errors were encountered: