How to pass headers to Couchdb.Server() ?

15 views
Skip to first unread message

Nagraj Gajengi

unread,
Jan 15, 2017, 7:46:56 AM1/15/17
to CouchDB-Python
I would like to pass some header values , It must be straight forward but I'm not able to figure it out. Can someone please tell me how do I do it?

Dirkjan Ochtman

unread,
Jan 15, 2017, 2:54:28 PM1/15/17
to couchdb...@googlegroups.com
On Sun, Jan 15, 2017 at 1:08 PM, Nagraj Gajengi <nagraj...@gmail.com> wrote:
> I would like to pass some header values , It must be straight forward but
> I'm not able to figure it out. Can someone please tell me how do I do it?

I think you could subclass `couchdb.http.Session` and pass an instance
of your subclass when instantiating the `Server` class. The subclass
could override the `request()` method and add headers to its `headers`
argument.

Let me know if that works out for you.

Cheers,

Dirkjan
Reply all
Reply to author
Forward
0 new messages