Compare commits

...

2 Commits

Author SHA1 Message Date
Adam Fowler 1b5c778e82 github ci update 2020-08-03 14:00:55 +01:00
Adam Fowler 55e94d8254 Add deprecated message to awsURLSignedRequest 2020-08-03 12:00:37 +01:00
2 changed files with 6 additions and 11 deletions

View File

@ -10,21 +10,16 @@ jobs:
uses: actions/checkout@v1 uses: actions/checkout@v1
with: with:
fetch-depth: 1 fetch-depth: 1
- name: Build - name: Build and Test
run: swift build
- name: Test
run: swift test run: swift test
linux: linux:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
tag: ['5.0', '5.1'] tag: ['5.0', '5.1', '5.2']
container: container:
image: swift:${{ matrix.tag }} image: swift:${{ matrix.tag }}
volumes:
- $GITHUB_WORKSPACE:/src
options: --workdir /src
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v1
@ -34,8 +29,6 @@ jobs:
run: | run: |
apt-get update -qq apt-get update -qq
apt-get install -q -y tzdata libssl-dev zlib1g-dev apt-get install -q -y tzdata libssl-dev zlib1g-dev
- name: Build - name: Build and Test
run: swift build
- name: Test
run: swift test run: swift test

View File

@ -27,12 +27,14 @@ public extension AWSSigner.BodyData {
public extension HTTPClient { public extension HTTPClient {
/// return signed HTTPClient request with signature in the headers /// return signed HTTPClient request with signature in the headers
@available(*, deprecated, message: "Support for AsyncHTTPClient will be removed in v3.0")
static func awsHeaderSignedRequest(url: URL, method: HTTPMethod = .GET, headers: HTTPHeaders = HTTPHeaders(), body: AWSSigner.BodyData? = nil, date: Date = Date(), signer: AWSSigner) throws -> HTTPClient.Request { static func awsHeaderSignedRequest(url: URL, method: HTTPMethod = .GET, headers: HTTPHeaders = HTTPHeaders(), body: AWSSigner.BodyData? = nil, date: Date = Date(), signer: AWSSigner) throws -> HTTPClient.Request {
let signedHeaders = signer.signHeaders(url: url, method: method, headers: headers, body: body, date: date) let signedHeaders = signer.signHeaders(url: url, method: method, headers: headers, body: body, date: date)
return try HTTPClient.Request(url: url, method: method, headers: signedHeaders, body: body?.body) return try HTTPClient.Request(url: url, method: method, headers: signedHeaders, body: body?.body)
} }
/// return signed HTTPClient request with signature in the URL /// return signed HTTPClient request with signature in the URL
@available(*, deprecated, message: "Support for AsyncHTTPClient will be removed in v3.0")
static func awsURLSignedRequest(url: URL, method: HTTPMethod = .GET, body: AWSSigner.BodyData? = nil, date: Date = Date(), expires: Int = 86400, signer: AWSSigner) throws -> HTTPClient.Request { static func awsURLSignedRequest(url: URL, method: HTTPMethod = .GET, body: AWSSigner.BodyData? = nil, date: Date = Date(), expires: Int = 86400, signer: AWSSigner) throws -> HTTPClient.Request {
let signedURL = signer.signURL(url: url, method: method, body: body, date: date, expires: expires) let signedURL = signer.signURL(url: url, method: method, body: body, date: date, expires: expires)
return try HTTPClient.Request(url: signedURL, method: method, body: body?.body) return try HTTPClient.Request(url: signedURL, method: method, body: body?.body)