Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matchers don't work with SSE response format #88

Open
davidvc opened this issue Jun 23, 2021 · 1 comment
Open

Matchers don't work with SSE response format #88

davidvc opened this issue Jun 23, 2021 · 1 comment

Comments

@davidvc
Copy link

davidvc commented Jun 23, 2021

Currently if you want to use matchers other than regular expression matching, a response body must be either JSON or XML.

A response format that is increasingly popular is Server Sent Events (SSE) as described here: https://html.spec.whatwg.org/multipage/server-sent-events.html

Server-Sent Events allow clients to be more performant and responsive as the full response does not need to be returned before the client can start processing any of the data.

The general format is one or more sections separated by two newlines, where each section looks like this:

event: <event-type>
data: <event-data>

Very frequently the data is JSON and could benefit from flexible, expressive matching. Instead today all we can use are regular expressions.

@uglyog
Copy link
Member

uglyog commented Jun 30, 2021

This could be a good candidate for a plugin, see #83

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants