HTTPSSEClient icon indicating copy to clipboard operation
HTTPSSEClient copied to clipboard

METHOD_POST vs METHOD_GET

Open kaimcpheeters opened this issue 2 years ago • 0 comments

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!

kaimcpheeters avatar Sep 12 '23 19:09 kaimcpheeters