Replies: 3 comments 5 replies
-
Greetings! I actually use them in some modules that have a simple logic and only need to perform one call, so we do not have to deal with opening and closing the session. You are right that it can basically be replaced by the session-based one. I refactored the This removes the duplicate logic. |
Beta Was this translation helpful? Give feedback.
-
Note: We could also implement a context manager for the session-class so it auto-closes. |
Beta Was this translation helpful? Give feedback.
-
Btw. I also found |
Beta Was this translation helpful? Give feedback.
-
Is there a reason for both of those to exist? Is it legacy code? @ansibleguy
I am working on a pull request, where I need to do some work in the api client. I wonder if we could just replace the both
single_get
andsingle_post
by itsSession::get
andSession::post
alternative?Beta Was this translation helpful? Give feedback.
All reactions