You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get a 406 http Error: Not Acceptable when I try to change the response content type to application/json-seq
What is the problem?
I want to stream a sequence of json objects, the default content type application/json is not suitable as the output is streamed with no englobing json array syntax, we just have a stream of lines each line containing a valid json object
I've found some interesting information, and it looks like the content type application/json-seq has been created for exactly this situation, unfortunately, it generates 406 error code in the current release of tapir, I have also noticed that MediaType doesn't contain a definition for this content type, no MediaType.ApplicationJsonSeq yet.
Thank you :) that was the issue, by using your suggestion it works fine now, still have an issue but this is related to the swagger user interface which is not yet able to understand json text sequences :
Tapir version: 1.9.2
Scala version: 3.3.1
I get a
406 http Error: Not Acceptable
when I try to change the response content type toapplication/json-seq
What is the problem?
I want to stream a sequence of json objects, the default content type
application/json
is not suitable as the output is streamed with no englobing json array syntax, we just have a stream of lines each line containing a valid json objectThe endpoint is declared as follow :
I've found some interesting information, and it looks like the content type
application/json-seq
has been created for exactly this situation, unfortunately, it generates 406 error code in the current release of tapir, I have also noticed that MediaType doesn't contain a definition for this content type, noMediaType.ApplicationJsonSeq
yet.Or do we have an alternative in Tapir for this use case ? I didn't find anything yet in examples or using google.
The text was updated successfully, but these errors were encountered: