HTTPClient: test all request headers#3425
Merged
Merged
Conversation
700fc54 to
50ad627
Compare
tonidero
approved these changes
Nov 17, 2023
tonidero
left a comment
Contributor
There was a problem hiding this comment.
❤️ We should add backend request snapshot tests working on Android soon
| ] | ||
|
|
||
| if let storefront = self.systemInfo.storefront { | ||
| headers["X-Storefront"] = storefront.countryCode |
Contributor
There was a problem hiding this comment.
FFTI but in android we add all the headers to the same map and then filter out null values. That might be slightly more legible?
| case eTag = "X-RevenueCat-ETag" | ||
| case eTagValidationTime = "X-RC-Last-Refresh-Time" | ||
| case postParameters = "X-Post-Params-Hash" | ||
| case headerParametersForSignature = "X-Header-Params-Hash" |
Contributor
There was a problem hiding this comment.
Hmm this enum seems unused?
…#3430) Requested by @NachoSoto for [http-client-test-headers](https://github.com/RevenueCat/purchases-ios/tree/http-client-test-headers) Co-authored-by: distiller <distiller@static.38.23.42.70.cyberlynk.net>
…#3429) Requested by @NachoSoto for [http-client-test-headers](https://github.com/RevenueCat/purchases-ios/tree/http-client-test-headers) Co-authored-by: Distiller <distiller@static.38.23.39.118.cyberlynk.net>
…#3427) Requested by @NachoSoto for [http-client-test-headers](https://github.com/RevenueCat/purchases-ios/tree/http-client-test-headers) Co-authored-by: Distiller <distiller@static.38.39.183.102.cyberlynk.net>
…#3426) Requested by @NachoSoto for [http-client-test-headers](https://github.com/RevenueCat/purchases-ios/tree/http-client-test-headers) Co-authored-by: Distiller <distiller@static.38.39.184.190.cyberlynk.net>
…#3428) Requested by @NachoSoto for [http-client-test-headers](https://github.com/RevenueCat/purchases-ios/tree/http-client-test-headers) Co-authored-by: Distiller <distiller@static.38.39.183.59.cyberlynk.net>
…#3432) Requested by @NachoSoto for [http-client-test-headers](https://github.com/RevenueCat/purchases-ios/tree/http-client-test-headers) Co-authored-by: Distiller <distiller@static.38.39.183.78.cyberlynk.net>
26c660b to
5d0afcb
Compare
…#3447) Requested by @NachoSoto for [http-client-test-headers](https://github.com/RevenueCat/purchases-ios/tree/http-client-test-headers) Co-authored-by: Distiller <distiller@static.38.39.185.38.cyberlynk.net>
…#3446) Requested by @NachoSoto for [http-client-test-headers](https://github.com/RevenueCat/purchases-ios/tree/http-client-test-headers) Co-authored-by: Distiller <distiller@static.38.23.39.42.cyberlynk.net>
…#3448) Requested by @NachoSoto for [http-client-test-headers](https://github.com/RevenueCat/purchases-ios/tree/http-client-test-headers) Co-authored-by: distiller <distiller@distillers-Virtual-Machine.local>
…#3449) Requested by @NachoSoto for [http-client-test-headers](https://github.com/RevenueCat/purchases-ios/tree/http-client-test-headers) Co-authored-by: Distiller <distiller@static.38.23.40.176.cyberlynk.net>
…#3454) Requested by @NachoSoto for [http-client-test-headers](https://github.com/RevenueCat/purchases-ios/tree/http-client-test-headers) Co-authored-by: Distiller <distiller@static.198.206.135.18.macminivault.com>
…#3455) Requested by @NachoSoto for [http-client-test-headers](https://github.com/RevenueCat/purchases-ios/tree/http-client-test-headers) Co-authored-by: distiller <distiller@distillers-Virtual-Machine.local>
…#3453) Requested by @NachoSoto for [http-client-test-headers](https://github.com/RevenueCat/purchases-ios/tree/http-client-test-headers) Co-authored-by: Distiller <distiller@static.198.206.135.45.macminivault.com>
…#3452) Requested by @NachoSoto for [http-client-test-headers](https://github.com/RevenueCat/purchases-ios/tree/http-client-test-headers) Co-authored-by: Distiller <distiller@static.38.23.39.121.cyberlynk.net>
…#3451) Requested by @NachoSoto for [http-client-test-headers](https://github.com/RevenueCat/purchases-ios/tree/http-client-test-headers) Co-authored-by: Distiller <distiller@static.38.39.184.186.cyberlynk.net>
tonidero
pushed a commit
that referenced
this pull request
Nov 30, 2023
**This is an automatic release.** ### RevenueCatUI * Paywalls: Fix navigation with close button in UIKit (#3466) via Andy Boedo (@aboedo) * `Paywalls`: `watchOS` support (#3291) via NachoSoto (@NachoSoto) ### Dependency Updates * Bump cocoapods from 1.14.2 to 1.14.3 (#3464) via dependabot[bot] (@dependabot[bot]) * Bump fastlane from 2.216.0 to 2.217.0 (#3415) via dependabot[bot] (@dependabot[bot]) * Bump danger from 9.3.2 to 9.4.0 (#3414) via dependabot[bot] (@dependabot[bot]) ### Other Changes * Some `APITester` fixes (#3444) via NachoSoto (@NachoSoto) * `HTTPClient`: test all request headers (#3425) via NachoSoto (@NachoSoto) * `CircleCI`: fix snapshot generation for iOS 14 (#3431) via NachoSoto (@NachoSoto) * Remove `MockStoreMessagesHelper` from SDK (#3417) via NachoSoto (@NachoSoto) * Enable explicit_init lint rule and fix issues (#3418) via Mark Villacampa (@MarkVillacampa)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows us to verify exactly what headers are included in all requests.
It also simplifies the implementation for #3424.