diff --git a/httpie/cli/examples/batch_templates.json b/httpie/cli/examples/batch_templates.json new file mode 100644 index 0000000000..4edaf66760 --- /dev/null +++ b/httpie/cli/examples/batch_templates.json @@ -0,0 +1,20 @@ +{ + "requests": [ + { + "name": "get-ip", + "method": "GET", + "url": "https://httpbin.org/ip" + }, + { + "name": "post-json", + "method": "POST", + "url": "https://httpbin.org/post", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "hello": "world" + } + } + ] +} diff --git a/httpie/cli/examples/batch_templates.yaml b/httpie/cli/examples/batch_templates.yaml new file mode 100644 index 0000000000..974260ad1c --- /dev/null +++ b/httpie/cli/examples/batch_templates.yaml @@ -0,0 +1,12 @@ +requests: + - name: get-ip + method: GET + url: https://httpbin.org/ip + + - name: post-json + method: POST + url: https://httpbin.org/post + headers: + Content-Type: application/json + body: + hello: world diff --git a/httpie/cli/httpie/cli/batch.py b/httpie/cli/httpie/cli/batch.py new file mode 100644 index 0000000000..63764a35ac --- /dev/null +++ b/httpie/cli/httpie/cli/batch.py @@ -0,0 +1,18 @@ +class BatchExecutor: + def __init__(self, args): + self.args = args + + def load_templates(self, file_path): + pass + + def preview_requests(self, requests): + pass + + def select_requests(self, requests): + pass + + def execute(self, requests): + pass + + def export_results(self, results): + pass