다음 틱 토큰 받아올때 크래시 수정

This commit is contained in:
2024-01-09 09:43:05 +09:00
parent e03bf6e199
commit 2439c0ef68

View File

@ -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))