Server Sent Events (SSE) #125
-
Is it possible to use rest-assured-net to test an endpoint that does Server Sent Events (SSE)? I have an SSE endpoint I'm trying to test now, and the behavior that I'm seeing is that the GET request does not complete until the server closes out the connection. In code terms, I'm seeing rest-assured-net behave the same way that I would expect the following code snippet to behave:
with the important bit being As opposed to
which will return the 200 and the headers right away and let you stream the content using Is it possible to tell rest-assured-net to use Here's an example test from my API project that I'm working with that interfaces with Argo Workflows. The
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hey @RothAndrew, thank you for your message. Would it be enough for you if I would provide a method in the DSL, for the RequestSpecification and a flag in the config to make RestAssured use You’re correct that it always uses the latter at the moment because that’s the default for |
Beta Was this translation helpful? Give feedback.
-
Tracking progress here: #126 |
Beta Was this translation helpful? Give feedback.
Hey @RothAndrew, thank you for your message.
Would it be enough for you if I would provide a method in the DSL, for the RequestSpecification and a flag in the config to make RestAssured use
ResponseHeadersRead
instead ofResponseContentRead
?You’re correct that it always uses the latter at the moment because that’s the default for
SendAsync()
:rest-assured-net/RestAssured.Net/Request/HttpRequestProcessor.cs
Line 131 in 9a5c71f