- locals {
- url = "http://localhost:8080" asdf = "world"
}
// test request "get with header" {
method = "GET" headers = [
"X-TEST: you:😄",] url = "${locals.url}/get"
}
- request "post with body" {
method = "POST" url = "${locals.url}/post" headers = [
"Content-Type: application/json",
]
body = <<END {
"hello": "${locals.asdf}"
} END expect = 200
}
- request "post with body that should fail" {
method = "POST" url = "${locals.url}/post" headers = [
"Content-Type: application/json",
]
body = <<END {
"hello": "${locals.asdf}"
} END expect = 401
}