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

Consider charset parameter in Content-Type header for server-sent events #11773

Closed
1 task done
yeonho84lee opened this issue Feb 28, 2023 · 2 comments
Closed
1 task done

Comments

@yeonho84lee
Copy link

yeonho84lee commented Feb 28, 2023

Is there an existing issue for this?

  • I have searched the tracker for existing similar issues and I know that duplicates will be closed

Describe the Issue

I read Introducing support for server-sent events in Postman with excitement. But I can not use the endpoint written in python FastAPI framework.

Most web frameworks, including FastAPI (version 0.92.0), can include charset parameter in the Content-Type header.
The response header of the FastAPI endpoint have the charset parameter.

In the response HTTP headers, look for the Content-Type header, and in particular for the charset parameter, e.g.

Content-Type: text/event-stream; charset=utf-8

See the curl command using my local endpoint and the HTTP Response:

curl -v '127.0.0.1:8000/stream'
*   Trying 127.0.0.1:8000...
* Connected to 127.0.0.1 (127.0.0.1) port 8000 (#0)
> GET /stream HTTP/1.1
> Host: 127.0.0.1:8000
> User-Agent: curl/7.81.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< date: Tue, 28 Feb 2023 06:37:56 GMT
< server: uvicorn
< cache-control: no-cache
< connection: keep-alive
< x-accel-buffering: no
< content-type: text/event-stream; charset=utf-8   <- This is inserted by FastAPI EventSourceResponse
< Transfer-Encoding: chunked
< 
id: 1
event: notification
data: message_content

id: 2
event: notification
data: message_content
...

Steps To Reproduce

You can use the following fastapi endpoint written in Python.

Screenshots or Videos

No response

Operating System

Any

Postman Version

10.10.9

Postman Platform

Postman App

User Account Type

Signed In User

Additional Context?

No response

@appurva21
Copy link
Member

@yeonho84lee Thanks for writing in! We'll get this fixed soon. You can follow this thread for further updates.


Closing this as duplicate of #11753

@appurva21
Copy link
Member

Hey @yeonho84lee! This issue is now fixed in the latest version of the Postman app (v10.12.0).

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

No branches or pull requests

2 participants