mistweaverco / kulala.nvim

A minimal 🤏 HTTP-client 🐼 interface 🖥️ for Neovim ❤️.
https://kulala.mwco.app
MIT License
582 stars 27 forks source link

Expose request verb, body, url, query params and headers in pre/post scripts. #194

Open hsanson opened 2 weeks ago

hsanson commented 2 weeks ago

In pre/post scripts the request seems to only have functions to set/get variables . I have some services that use a custom HMAC authentication that requires computation of a signature that is then sent in the Authorization header.

The signature is computed by generating a canonical string that contains the request verb, url, query params, body, and a timestamp that is then encrypted with a token. Details can be found in the API-AUTH ruby gem, that is what the service I use uses to implement authentication.

If the request object in pre/post scripts exposes this information it would be easy for me to implement the signature and add the header to the request before it is sent to the server.

gorillamoe commented 5 days ago

Just a quick heads up. Development should start this weekend 🥵