Skip to content

Commit

Permalink
Add deprecated message to awsURLSignedRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Aug 3, 2020
1 parent c8e382c commit 55e94d8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/HTTPClientAWSSigner/request.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ public extension AWSSigner.BodyData {

public extension HTTPClient {
/// 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 {
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 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 {
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)
Expand Down

0 comments on commit 55e94d8

Please sign in to comment.