Hey Keith,
On Thu, Jul 12, 2012 at 4:16 AM, Keith Rarick <
k...@xph.us> wrote:
> I also need to set content-disposition.
> Gustavo, would you accept a patch to
> add support for custom headers?
Definitely. The only issue is that I'm not entirely sure about the
best approach around this yet. I've been thinking about this, and will
try to experiment with an interface to get a feeling for how it would
look like in practice.
> How would you recommend going about
> the implementation? How would you feel
> if each of the Bucket methods (Put, Get,
> Del, etc) returned a Request value rather
> than actually running the operation? The
> user could, optionally, add headers to the
> request, then actually send it. So it'd be
> something like this:
>
> err := b.NewPut(...).Do()
>
> or, to set a header:
>
> r := b.NewPut(...)
> r.Header.Set("content-disposition", "...")
> err := r.Do()
Yeah, I know this is how the Google APIs are structure, but I honestly
don't find these interfaces very attractive. It feels a bit like
foo.DoIt(foo).NoIMeanit().
Maybe that's the best way to go, though. Please give me a moment and
I'll try to come up with something this week still.
gustavo @
http://niemeyer.net