3
0

HttpRequestJobConfig.cpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. // The AWS Native SDK AWSAllocator triggers a warning due to accessing members of std::allocator directly.
  9. // AWSAllocator.h(70): warning C4996: 'std::allocator<T>::pointer': warning STL4010: Various members of std::allocator are deprecated in C++17.
  10. // Use std::allocator_traits instead of accessing these members directly.
  11. // You can define _SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to acknowledge that you have received this warning.
  12. #include <AzCore/PlatformDef.h>
  13. AZ_PUSH_DISABLE_WARNING(4251 4996, "-Wunknown-warning-option")
  14. #include <aws/core/client/ClientConfiguration.h>
  15. #include <aws/core/http/HttpClientFactory.h>
  16. AZ_POP_DISABLE_WARNING
  17. #include <Framework/HttpRequestJobConfig.h>
  18. namespace AWSCore
  19. {
  20. void HttpRequestJobConfig::ApplySettings()
  21. {
  22. AwsApiJobConfig::ApplySettings();
  23. Aws::Client::ClientConfiguration config{ GetClientConfiguration() };
  24. m_readRateLimiter = config.readRateLimiter;
  25. m_writeRateLimiter = config.writeRateLimiter;
  26. m_userAgent = config.userAgent;
  27. m_httpClient = Aws::Http::CreateHttpClient(config);
  28. }
  29. } // namespace AWSCore