You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
1.0 KiB
77 lines
1.0 KiB
5 years ago
|
:80 {
|
||
|
@matcher {
|
||
|
method GET
|
||
|
}
|
||
|
respond @matcher "get"
|
||
|
|
||
|
@matcher2 method POST
|
||
|
respond @matcher2 "post"
|
||
|
|
||
|
@matcher3 not method PUT
|
||
|
respond @matcher3 "not put"
|
||
|
}
|
||
|
----------
|
||
|
{
|
||
|
"apps": {
|
||
|
"http": {
|
||
|
"servers": {
|
||
|
"srv0": {
|
||
|
"listen": [
|
||
|
":80"
|
||
|
],
|
||
|
"routes": [
|
||
|
{
|
||
|
"match": [
|
||
|
{
|
||
|
"method": [
|
||
|
"GET"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"handle": [
|
||
|
{
|
||
|
"body": "get",
|
||
|
"handler": "static_response"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"match": [
|
||
|
{
|
||
|
"method": [
|
||
|
"POST"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"handle": [
|
||
|
{
|
||
|
"body": "post",
|
||
|
"handler": "static_response"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"match": [
|
||
|
{
|
||
|
"not": [
|
||
|
{
|
||
|
"method": [
|
||
|
"PUT"
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"handle": [
|
||
|
{
|
||
|
"body": "not put",
|
||
|
"handler": "static_response"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|