oatpp/changelog/1.4.0.md
Ferry Huberts aa02f4bb3f Fix Clang compiler warnings (-Wextra-semi-stmt)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
2023-09-02 23:12:26 +02:00

1.1 KiB

Oat++ 1.4.0

Previous release - 1.3.0

Feel free to ask questions - Chat on Gitter!

Contents:

URL Encoder And Decoder

#include "oatpp/encoding/Url.hpp"

...

oatpp::String data = "Hello URL-Encoder!!!";

oatpp::encoding::Url::Config config;
auto encoded = oatpp::encoding::Url::encode(data, config);
auto decoded = oatpp::encoding::Url::decode(encoded);

OATPP_ASSERT(decoded == data)

Note: Oat++ does NOT automatically decode URL and its parameters on endpoint hit.

Async Condition Variable

#include "oatpp/core/async/ConditionVariable.hpp"

  ...
  
  oatpp::async::Lock* m_lock;
  oatpp::async::ConditionVariable* m_cv;
  
  ...
  
  Action act() override {
    return m_cv->waitFor(m_lock, // async::Lock
                         [this]{return m_resource->counter == 100;}, // condition
                         std::chrono::seconds(5)) // timeout
           .next(finish());
  }
  ...