mirror of
https://github.com/RevenueCat/purchases-ios
synced 2026-11-11 22:55:55 +05:45
HTTPClient: log actual response status code (#2487)
We were currently logging the status code retrieved from `ETagManager`, which made it seem like etags weren't working. Example: > API request completed: GET /v1/subscribers/identify (200) With this change, we now log the actual response status code so we can verify the server is returning the correct status code: > API request completed: GET /v1/subscribers/identify (304)
This commit is contained in:
1 parent
7dbc39da51
commit
d68ca889e9
2 files changed
+16
-1
No files matched your search
@@ -93,3 +93,13 @@ extension HTTPStatusCode {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension URLResponse {
|
||||
|
||||
var httpStatusCode: HTTPStatusCode? {
|
||||
guard let response = self as? HTTPURLResponse else { return nil }
|
||||
|
||||
return .init(rawValue: response.statusCode)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user