fix(gold): use GET for VNAppMob key refresh endpoint

VNAppMob /api/request_api_key returns 405 for POST and accepts GET.
This commit is contained in:
2026-06-15 11:17:50 +07:00
parent abde3a1c87
commit c889d77472
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -212,7 +212,7 @@ func (c *VNAppMobClient) refreshKeyLocked(ctx context.Context) error {
return err
}
req, err := http.NewRequestWithContext(ctx, http.MethodPost, endpoint, nil)
req, err := http.NewRequestWithContext(ctx, http.MethodGet, endpoint, nil)
if err != nil {
return fmt.Errorf("vnappmob: build refresh request: %w", err)
}
@@ -100,8 +100,8 @@ func TestRefreshKey(t *testing.T) {
exp := time.Unix(1000, 0).Add(14 * 24 * time.Hour).Unix()
var refreshHits int32
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodPost {
t.Errorf("refresh: want POST, got %s", r.Method)
if r.Method != http.MethodGet {
t.Errorf("refresh: want GET, got %s", r.Method)
}
if !strings.HasSuffix(r.URL.Path, "/api/request_api_key") {
t.Errorf("refresh path: got %s", r.URL.Path)