Skip to content

Commit

Permalink
Http API change + update to CRT v0.5.4 (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
bretambrose authored Sep 23, 2019
1 parent 0a53272 commit b15c076
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion aws-common-runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ set(AWS_DEPS_DOWNLOAD_DIR "${AWS_DEPS_BUILD_DIR}/downloads" CACHE PATH "Dependen
message("install dir ${AWS_DEPS_INSTALL_DIR}")

set(AWS_CRT_CPP_URL "https://github.com/awslabs/aws-crt-cpp.git")
set(AWS_CRT_CPP_SHA "v0.5.3")
set(AWS_CRT_CPP_SHA "v0.5.4")
include(BuildAwsCrtCpp)
2 changes: 1 addition & 1 deletion codebuild/common-posix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fi

# build aws-crt-cpp
pushd $BUILD_PATH
git clone --branch v0.5.3 https://github.com/awslabs/aws-crt-cpp.git
git clone --branch v0.5.4 https://github.com/awslabs/aws-crt-cpp.git
cd aws-crt-cpp
cmake $CMAKE_ARGS -DBUILD_DEPS=ON ./
cmake --build . --target install
Expand Down
2 changes: 1 addition & 1 deletion codebuild/common-windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ mkdir %INSTALL_DIR%
@rem build aws-crt-cpp
mkdir %BUILDS_DIR%\aws-crt-cpp-build
cd %BUILDS_DIR%\aws-crt-cpp-build
git clone --branch v0.5.3 https://github.com/awslabs/aws-crt-cpp.git
git clone --branch v0.5.4 https://github.com/awslabs/aws-crt-cpp.git
cmake %CMAKE_ARGS% -DCMAKE_INSTALL_PREFIX="%INSTALL_DIR%" -DCMAKE_PREFIX_PATH="%INSTALL_DIR%" -DCMAKE_BUILD_TYPE="Release" -DBUILD_DEPS=ON aws-crt-cpp || goto error
cmake --build . --target install || goto error

Expand Down
10 changes: 6 additions & 4 deletions discovery/source/DiscoveryClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,12 @@ namespace Aws
Crt::Http::HttpRequestOptions requestOptions;
requestOptions.request = request.get();
requestOptions.onIncomingHeaders =
[](Crt::Http::HttpStream &, const Crt::Http::HttpHeader *, std::size_t) {};
requestOptions.onIncomingHeadersBlockDone = [callbackContext](Crt::Http::HttpStream &stream, bool) {
callbackContext->responseCode = stream.GetResponseStatusCode();
};
[](Crt::Http::HttpStream &, aws_http_header_block, const Crt::Http::HttpHeader *, std::size_t) {
};
requestOptions.onIncomingHeadersBlockDone =
[callbackContext](Crt::Http::HttpStream &stream, aws_http_header_block) {
callbackContext->responseCode = stream.GetResponseStatusCode();
};
requestOptions.onIncomingBody =
[callbackContext](Crt::Http::HttpStream &, const Crt::ByteCursor &data) {
callbackContext->ss.write(reinterpret_cast<const char *>(data.ptr), data.len);
Expand Down

0 comments on commit b15c076

Please sign in to comment.