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
_Because initially the project was written for a different AppAPI
authentication, where all transmitted data was signed - there was a lot
of unnecessary code left._
This pull request will cover it all, total refactoring and
simplification of the code.
**After this, it will be possible to make public methods for
communicating with Nextcloud, which would make it easier to connect
third-party packages.**
**It is also necessary to clean up the code before adding asynchronous
methods.**
Changes proposed in this pull request:
* set `AUTHORIZATION-APP-API` header with help of `event_hook`
* set default `timeout` during `httpx.adapter` creation
* set `base_url` during `httpx.adapter` creation
* download_directory_as_zip: directly call `session.adapter.stream`
(removed `_session.get_stream`)
* all DAV methods now directly call `_session.adapter_dav.XXX` (removed
`_session.dav` / `_session.dav_stream`)
* removed `_session.request` and `_sessions.request_json` - instead
directly call `session.adapter`
* `response_headers` are now set with help of `httpx.event_hooks`
* other internal code refactoring
---------
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
0 commit comments