Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
![]() |
1b5c778e82 | |
![]() |
55e94d8254 |
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue