Skip to content

Commit b15c076

Browse files
authored
Http API change + update to CRT v0.5.4 (#62)
1 parent 0a53272 commit b15c076

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

aws-common-runtime/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ set(AWS_DEPS_DOWNLOAD_DIR "${AWS_DEPS_BUILD_DIR}/downloads" CACHE PATH "Dependen
1818
message("install dir ${AWS_DEPS_INSTALL_DIR}")
1919

2020
set(AWS_CRT_CPP_URL "https://github.com/awslabs/aws-crt-cpp.git")
21-
set(AWS_CRT_CPP_SHA "v0.5.3")
21+
set(AWS_CRT_CPP_SHA "v0.5.4")
2222
include(BuildAwsCrtCpp)

codebuild/common-posix.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fi
1717

1818
# build aws-crt-cpp
1919
pushd $BUILD_PATH
20-
git clone --branch v0.5.3 https://github.com/awslabs/aws-crt-cpp.git
20+
git clone --branch v0.5.4 https://github.com/awslabs/aws-crt-cpp.git
2121
cd aws-crt-cpp
2222
cmake $CMAKE_ARGS -DBUILD_DEPS=ON ./
2323
cmake --build . --target install

codebuild/common-windows.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mkdir %INSTALL_DIR%
88
@rem build aws-crt-cpp
99
mkdir %BUILDS_DIR%\aws-crt-cpp-build
1010
cd %BUILDS_DIR%\aws-crt-cpp-build
11-
git clone --branch v0.5.3 https://github.com/awslabs/aws-crt-cpp.git
11+
git clone --branch v0.5.4 https://github.com/awslabs/aws-crt-cpp.git
1212
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
1313
cmake --build . --target install || goto error
1414

discovery/source/DiscoveryClient.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,12 @@ namespace Aws
152152
Crt::Http::HttpRequestOptions requestOptions;
153153
requestOptions.request = request.get();
154154
requestOptions.onIncomingHeaders =
155-
[](Crt::Http::HttpStream &, const Crt::Http::HttpHeader *, std::size_t) {};
156-
requestOptions.onIncomingHeadersBlockDone = [callbackContext](Crt::Http::HttpStream &stream, bool) {
157-
callbackContext->responseCode = stream.GetResponseStatusCode();
158-
};
155+
[](Crt::Http::HttpStream &, aws_http_header_block, const Crt::Http::HttpHeader *, std::size_t) {
156+
};
157+
requestOptions.onIncomingHeadersBlockDone =
158+
[callbackContext](Crt::Http::HttpStream &stream, aws_http_header_block) {
159+
callbackContext->responseCode = stream.GetResponseStatusCode();
160+
};
159161
requestOptions.onIncomingBody =
160162
[callbackContext](Crt::Http::HttpStream &, const Crt::ByteCursor &data) {
161163
callbackContext->ss.write(reinterpret_cast<const char *>(data.ptr), data.len);

0 commit comments

Comments
 (0)