Я хочу знать пример http-сообщения
Я вижу ссылку, но не нашел синтаксис для сообщения http
https://seatunel.apache.org/docs/2.3.5/connector-v2/source/Http





пример:
https://github.com/apache/seatunnel/blob/ec1c3198bcffb8ff6b41014c36d4ddacedb03868/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-http-e2e/src/test/resources/http_formrequestbody_to_assert.conf#L27https://github.com/apache/seatunnel/blob/ec1c3198bcffb8ff6b41014c36d4ddacedb03868/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-http-e2e/src/test/resources/http_jsonrequestbody_to_assert.conf#L28
Вам нужно только настроить method и body
source {
Http {
url = "http://example.com/example/jsonBody"
method = "POST"
body = "......"
......
}
}
{
"result_table_name": "all_users_api_result",
"plugin_name": "Http",
"url": "http://example.com/api/users/graphql",
"method": "POST",
"headers": {
"Content-Type": "application/json"
},
"body": "{\"query\":\"query GetAllUsers($filter: UserFilter) { getAllUsers(filter: $filter) { userId userName email role status createdDate lastLoginDate } }\",\"variables\":{\"filter\":{\"status\":\"ACTIVE\"}}}",
"format": "json",
"poll_interval": 3600,
"json_field": {
"userId": "$.data.getAllUsers[*].userId",
"userName": "$.data.getAllUsers[*].userName",
"email": "$.data.getAllUsers[*].email",
"role": "$.data.getAllUsers[*].role",
"status": "$.data.getAllUsers[*].status",
"createdDate": "$.data.getAllUsers[*].createdDate",
"lastLoginDate": "$.data.getAllUsers[*].lastLoginDate"
},
"schema": {
"fields": {
"userId": "string",
"userName": "string",
"email": "string",
"role": "string",
"status": "string",
"createdDate": "string",
"lastLoginDate": "string"
}
}
}
спасибо, это помогает мне выполнить задачу. Я обновил окончательный ответ, как показано ниже.