apimock 2.3.2

API mock Server generating HTTP/JSON responses written in Rust
Documentation
[general]
ip_address = "127.0.0.1"
port = 3001
dyn_data_dir = "apimock-data"
# always = "{ greetings: \"Hello, world.\" }"

[url]
data_dir = "tests"
data_dir_query_path = "@@"
path_prefix = "api/v1"

[url.headers]
cookie_1 = { key = "Set-Cookie", value = "a=b; c=d" }
redirect_1 = { key = "Location", value = "/api/v1/home" }

[url.paths]
"home" = "home.json"
# "some/path" = "api.json5"
# custom header
"some/path/w/header" = { src = "home.json", headers = ["cookie_1"] }
"some/path/w/matcher" = "home.json"
# errors / redirects * code must be unsigned integer
"error/401" = { code = 401 }
"error/api-403" = { code = 403 }
"redirect/302" = { code = 302, headers = ["redirect_1"] }

[url.paths_patterns."some/path/w/matcher"."a.b.c"]
"=1" = "api.json5"
"=0" = "home.json"
[url.paths_patterns."some/path/w/matcher"."d.2.e"]
"=x=" = "api.json5"
[url.paths_patterns."some/path/w/matcher"."f"]
"=" = "api.json5"

[url.raw_paths]
"/" = { text = "{ Hello: world }", code = 301, headers = ["cookie_1", "redirect_1"] }