github.com/avenga/couper@v1.12.2/server/testdata/endpoints/19_couper.hcl (about) 1 server { # sequences 2 hosts = ["*:8080"] 3 4 api { 5 endpoint "/" { 6 request "r1" { 7 url = "/res1" 8 backend = "src" 9 } 10 11 request "r2" { 12 url = "/res2" 13 backend = "src" 14 } 15 16 request { # default 17 url = "/" 18 backend = "dest" 19 json_body = { 20 data = [ 21 backend_responses.r1.json_body, 22 backend_responses.r2.json_body 23 ] 24 } 25 } 26 } 27 } 28 } 29 30 definitions { 31 backend "src" { 32 origin = "http://localhost:8081" 33 } 34 35 backend "dest" { 36 origin = "http://localhost:8082" 37 } 38 } 39 40 server "src" { 41 hosts = ["*:8081"] 42 43 api { 44 endpoint "/res1" { 45 response { 46 json_body = { 47 features = 1 48 } 49 } 50 } 51 52 endpoint "/res2" { 53 response { 54 json_body = { 55 features = 2 56 } 57 } 58 } 59 } 60 } 61 62 server "dest" { 63 hosts = ["*:8082"] 64 65 api { 66 endpoint "/" { 67 response { 68 json_body = request.json_body 69 } 70 } 71 } 72 }