# Test throttle functionality $baseUrl = "http://localhost:3000" Write-Host "Testing throttle functionality..." -ForegroundColor Green # Test: Try to register (should work now with increased limit) Write-Host "`nTesting register with increased throttle limit..." -ForegroundColor Yellow $registerData = @{ username = "testuser_throttle" password = "password123" nickname = "Test User Throttle" } | ConvertTo-Json try { $response = Invoke-RestMethod -Uri "$baseUrl/auth/register" -Method POST -Body $registerData -ContentType "application/json" -ErrorAction Stop Write-Host "Status: Success (201)" -ForegroundColor Green Write-Host "Response: $($response.message)" -ForegroundColor Green } catch { $statusCode = $_.Exception.Response.StatusCode.value__ Write-Host "Status Code: $statusCode" -ForegroundColor $(if ($statusCode -eq 429) { "Yellow" } else { "Red" }) if ($_.Exception.Response) { $reader = New-Object System.IO.StreamReader($_.Exception.Response.GetResponseStream()) $responseBody = $reader.ReadToEnd() Write-Host "Response: $responseBody" -ForegroundColor Gray } } Write-Host "`nTest completed!" -ForegroundColor Green