Content-Type for bucket.Get

19 views
Skip to first unread message

Brian Jacokes

unread,
Mar 15, 2013, 12:24:01 AM3/15/13
to go...@googlegroups.com
I noticed that Put and PutReader take a contType argument, but there's no way to get that value back out through Get or GetReader. Are there any plans to add this to the library? It's only a few-line change, but I suspect that keeping the interface clean would be the main objection. For what it's worth, having this method would solve the issue (same implementation as GetReader, but returning resp instead of resp.Body):

func (b *Bucket) GetResponse(path string) (resp *http.Response, err error)

Gustavo Niemeyer

unread,
Mar 15, 2013, 9:40:55 AM3/15/13
to go...@googlegroups.com
On Fri, Mar 15, 2013 at 1:24 AM, Brian Jacokes <bjac...@parse.com> wrote:
> I noticed that Put and PutReader take a contType argument, but there's no
> way to get that value back out through Get or GetReader. Are there any plans
> to add this to the library? It's only a few-line change, but I suspect that
> keeping the interface clean would be the main objection. For what it's
> worth, having this method would solve the issue (same implementation as
> GetReader, but returning resp instead of resp.Body):

Yeah, there will be support for this kind of thing in the near future,
and also for fiddling with the request itself. This will be a new
revision of the API, though, in a different import path, since it
requires incompatible changes.


gustavo @ http://niemeyer.net
Reply all
Reply to author
Forward
0 new messages