Skip to content

Commit

Permalink
added Identifiable to AnyRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoughjr committed Dec 29, 2024
1 parent 8485f39 commit 55d736b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sources/Request/Request/Request.swift
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ public struct AnyRequest<ResponseType> where ResponseType: Decodable {
}
}

extension AnyRequest: Identifiable {
public var id: String {
buildSession().request.url!.absoluteString
}
}

extension AnyRequest: Equatable {
public static func == (lhs: AnyRequest<ResponseType>, rhs: AnyRequest<ResponseType>) -> Bool {
let lhsSession = lhs.buildSession()
Expand Down

0 comments on commit 55d736b

Please sign in to comment.