HTTPSSEClient
HTTPSSEClient copied to clipboard
METHOD_POST vs METHOD_GET
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.
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!