From ac44017c373b3d75a9ba8647fb461c3fc4acf536 Mon Sep 17 00:00:00 2001 From: Arnaud Veron Date: Thu, 11 Jul 2024 17:36:33 +0200 Subject: [PATCH] Fix http header for data stream * curl -s --http2 -X GET -N -H 'Accept: text/event-stream' -u $user:$pass https://a.b.c.d:1215/events --- src/js/components/Api.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/components/Api.jsx b/src/js/components/Api.jsx index 5b9b85c..320b24e 100644 --- a/src/js/components/Api.jsx +++ b/src/js/components/Api.jsx @@ -153,7 +153,7 @@ function ApiHandlerExample(props) { buff += " -H 'o-node: " + node.node + "'" } if (data.stream) { - buff += " -N -H 'Content-Type: text/event-stream'" + buff += " -N -H 'Accept: text/event-stream'" } else { buff += " -H 'Content-Type: application/json'" }