HttpResponse.cpp 733 B

123456789101112131415161718192021222324
  1. /**
  2. * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
  3. * SPDX-License-Identifier: Apache-2.0.
  4. */
  5. #include <aws/core/http/HttpResponse.h>
  6. #include <aws/core/utils/memory/stl/AWSStreamFwd.h>
  7. #include <aws/core/utils/StringUtils.h>
  8. namespace Aws
  9. {
  10. namespace Http
  11. {
  12. /**
  13. * Overload ostream operator<< for HttpResponseCode enum class for a prettier output such as "200" and not "<C8-00 00-00>"
  14. */
  15. Aws::OStream& operator<< (Aws::OStream& oStream, HttpResponseCode code)
  16. {
  17. oStream << Aws::Utils::StringUtils::to_string(static_cast<typename std::underlying_type<HttpResponseCode>::type>(code));
  18. return oStream;
  19. }
  20. } // Http
  21. } // Aws