Я отправляю запрос, как показано ниже
Код: Выделить всё
curl --location 'https://backend-dev-url.com/api/v1' \
--header 'Content-Type: application/json' \
--data '{
"a":"value",
"b":"value"
}'
Код: Выделить всё
{
"a": [
"This field is required."
],
"b": [
"This field is required."
]
}
Ниже приведена часть конфигурации krakend для этого микросервиса.
Код: Выделить всё
{
"endpoint": "api/v1",
"method": "POST",
"output_encoding": "no-op",
"backend": [
{
"url_pattern": "api/v1",
"encoding": "no-op",
"sd": "static",
"method": "POST",
"host": ["http://localhost:8000"],
"disable_host_sanitize": false
}
],
"input_headers": ["Authorization","Content-Type"],
"extra_config": {
"qos/ratelimit/router": {
"max_rate": 100,
"client_max_rate": 60,
"every": "1m",
"strategy": "ip"
}
}
}
Подробнее здесь: https://stackoverflow.com/questions/792 ... en-in-json