base_url = System.get_env("MOCK_SERVER_URL") || "http://localhost:8000"
{:ok, response} =
Req.request(
method: :{{ method }},
url: base_url <> "{{ path }}"{% if headers or body %},{% endif %}
{% if headers %}
headers: [
{% for header in headers %}
{"{{ header.key }}", "{{ header.value }}"},
{% endfor %}
]{% if body %},{% endif %}
{% endif %}
{% if body %}
{{ "body" if raw_body else "json" }}: {{ body }}
{% endif %}
)