我们可以使用请求方法" POST"在apache nifi中获取流量状态

时间:2016-11-29 05:50:21

标签: post apache-nifi

我正在使用GET方法来获取nifi的当前状态。当我尝试使用POST方法获取状态时,远程服务器返回405错误。请告诉我有什么解决方案可以解决这个问题。提前谢谢。

1 个答案:

答案 0 :(得分:3)

状态端点仅接受GET个请求。任何其他HTTP方法都将导致错误并返回405状态代码。您是否有理由使用POST?该文档声明它只接受GET

GET /flow/status
Gets the current status of this NiFi
Request
consumes:
*/*
Response
produces:
application/json
Status Code Type    Description
200 ControllerStatusEntity  successful operation
400 string  NiFi was unable to complete the request because it was invalid. The request should not be retried without modification.
401 string  Client could not be authenticated.
403 string  Client is not authorized to make this request.
409 string  The request was valid but NiFi was not in the appropriate state to process it. Retrying the same request later may be successful.
Authorization
Read - /flow