diff --git a/voicechat/eos_impl.go b/voicechat/eos_impl.go index 18fd78d..d05370c 100644 --- a/voicechat/eos_impl.go +++ b/voicechat/eos_impl.go @@ -34,9 +34,8 @@ func eosTokenRefresh(target *unsafe.Pointer, ctx context.Context) { endpoint := "https://api.epicgames.dev/auth/v1/oauth/token" auth := base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("%s:%s", config.EosClientId, config.EosClientSecret))) - body := bytes.NewBufferString("grant_type=client_credentials&deployment_id=" + config.EosDeploymentId) for { - req, _ := http.NewRequest("POST", endpoint, body) + req, _ := http.NewRequest("POST", endpoint, bytes.NewBufferString("grant_type=client_credentials&deployment_id="+config.EosDeploymentId)) req.Header.Set("Content-Type", "application/x-www-form-urlencoded") req.Header.Set("Accept", "application/json") req.Header.Set("Authorization", fmt.Sprintf("Basic %s", auth))