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

METHOD_POST vs METHOD_GET #5

Open
kaimcpheeters opened this issue Sep 12, 2023 · 0 comments
Open

METHOD_POST vs METHOD_GET #5

kaimcpheeters opened this issue Sep 12, 2023 · 0 comments

Comments

@kaimcpheeters
Copy link

kaimcpheeters commented Sep 12, 2023

Hi @WolfgangSenff, thank you for making your HTTP SSE Client available. I was curious if there is anything unique about the Godot environment that requires the use of a POST request in the SSE use case. My understanding of the protocol is it's typically a GET request.

Line 46

func attempt_to_request(httpclient_status):
    if httpclient_status == HTTPClient.STATUS_CONNECTING or httpclient_status == HTTPClient.STATUS_RESOLVING:
        return
        
    if httpclient_status == HTTPClient.STATUS_CONNECTED:
        var err = httpclient.request(HTTPClient.METHOD_POST, url_after_domain, ["Accept: text/event-stream"])
        if err == OK:
            is_requested = true

Thanks!

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

1 participant