@dom68 @OderWat The use case is pretty simple: I just need to upload a docx file to Google Drive from a CLI tool. The tool was originally written in Python with PyDrive, so the whole API interaction layer was hidden.
I also thought about keeping the server running the whole time, but this looks overcomplicated for the task. I ended up writing an async proc the reads a single line from a socket as suggested by @ephja. It's not perfect, because I have to extract the code from the awaited line, e.g. "GET /?code=123qwe456asd789zxc HTTP/1.1" instead of using an existing HTTP parser. Also, I couldn't yet figure out how to send a proper HTTP response, but that's optional, so I didn't spend too much time on it. I want to thank everybody for help! You guys are awesome!