Skip to content

Commit 36e626a

Browse files
Updated to latest beast version
1 parent bda74ef commit 36e626a

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,18 @@ The library uses [beast](https://www.boost.org/doc/libs/develop/libs/beast/doc/h
5555
5656
Use cmake to build it on Windows, macOS and Linux.
5757
58+
### Dependencies using VCPKG
59+
60+
```
61+
./vcpkg install boost
62+
./vcpkg install fmt
63+
./vcpkg install uriparser
64+
./vcpkg install nlohmann-json
65+
./vcpkg install spdlog
66+
./vcpkg install protobuf
67+
./vcpkg install grpc
68+
```
69+
5870
## Use with CMake
5971
6072
```CMake

src/KV.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ stdx::optional<std::string> consulcpp::KV::get( const std::string & key ) const
4343
spdlog::error( "{}. Json was: {}", e.what(), response.value() );
4444
}
4545
if( !value.empty() ){
46-
res = boost::beast::detail::base64_decode( value );
46+
char * out = (char*)calloc( value.size(), sizeof(char) );
47+
auto info = boost::beast::detail::base64::decode( out, value.c_str(), value.size() );
48+
res = std::string( out, info.first );
49+
free( out );
4750
}
4851
}
4952
}

0 commit comments

Comments
 (0)