python-caldav / caldav

Apache License 2.0
314 stars 94 forks source link

Support passing custom HTTP headers #285

Closed JasonSanDiego closed 1 year ago

JasonSanDiego commented 1 year ago

I'm using Nextcloud and want to retrieve calendar (read only) subscriptions along with the normal read/write calendars. Nextcloud supports two ways of doing this. The easier of the two is to pass the custom HTTP header: X-NC-CalDAV-Webcal-Caching: On

More details

Are folks open to adding this functionality by modfying the DAVclient initialization function to have an optional header parameter?

Example use: client = caldav.DAVClient(..., headers={"X-NC-CalDAV-Webcal-Caching": "On"})

If so, I can file a pull request with this small change.

tobixen commented 1 year ago

Pull request is appreciated.

tobixen commented 1 year ago

The feature will be released in 1.2 shortly. However, the issue should not be closed, we're missing documentation and test code.

tobixen commented 1 year ago

This was fixed in #306 indeed. Thanks. Will be released in 1.3 today, I hope.