Closed trosos closed 4 years ago
Sounds like a good suggestion, thanks.
I'm actually reworking the request-response code a bit right now, I'll add support for this while I'm at it.
I'll let you know when there's a PR.
I've reworked the Application
argument handling a bit and added support for passing custom session objects.
I would appreciate having an option to use an existing, possibly already cookie-authenticated aiohttp session (without the need of subclassing
snow.Application
or monkey-patchingsnow.Application.get_session
).The Application instantiation then might look like:
Usecase: I want to share the http session with aiocometd, which needs to perform http authentication only once (at POST /api/now/amb/session/start), and then uses cookies for authenticating any further communication; this also works for ServiceNow Table API.