Open cedric05 opened 2 years ago
Http item can have a syntax like
@plugin("<pluginid>", ["list of arguements"])
GET "https://httpbin.org/get"
using pluginid, dothttp will load that plugin and apply that transformation.
For example:
GET "https://httpbin.org/get"
hawkauth plugin will apply headers.
For Plugin after researching here is the plan, i think would make sense
AWS lambda uses packaged .zip
files to load lamdba function defined.
aws sam uses package
to package lamdba python function to ease deployment.
ref: https://github.com/aws/aws-sam-cli/blob/develop/samcli/commands/package/command.py
module built via pyinstaller (like dothttp) can load packages from by appending path to packages to sys.path
. after that, module can be loaded via importlib.import_module('package')
.
There are scenarios where running custom transformations before making a http request, ideally test_script is a way to write those out.
Not all transformations can be written in test_script, there should be a way for dothttp to figure out plugin and load those plugin and apply those tranformations easily.
This way users can write their own custom plugins, install and use.