我正在尝试使用 kafka-rest 接口将 Protobuf 模式发布到模式注册表:
curl -X POST -H "Content-Type: application/vnd.kafka.protobuf.v2+json" \
-H "Accept: application/vnd.kafka.v2+json" \
--data '{"value_schema": "syntax=\"proto3\"; message User { string name = 1; }", "records": [{"value": {"name": "testUser"}}]}' \
"http://localhost:8082/topics/protobuftest"
我收到此错误:
{"error_code":415,"message":"HTTP 415 Unsupported Media Type"}
问题:指示此工作的媒体类型的正确方法是什么?