Skip to content

HTTPClient: extracted HTTPRequestPath protocol#2986

Merged
NachoSoto merged 4 commits into
mainfrom
nacho/sdk-3162-ios-support-alternative-endpoint-for-offerings
Aug 10, 2023
Merged

HTTPClient: extracted HTTPRequestPath protocol#2986
NachoSoto merged 4 commits into
mainfrom
nacho/sdk-3162-ios-support-alternative-endpoint-for-offerings

Conversation

@NachoSoto

Copy link
Copy Markdown
Contributor

This paves the way to add a second set of paths with a separate server URL to be able to shed requests to offerings and product entitlement mapping to a separate server.

Changes:

  • New HTTPRequestPath with the same properties as HTTPRequest.Path + a new serverHostURL
  • Moved proxy logic from SystemInfo/HTTPClient to HTTPRequestPath
  • Simplified HTTPRequest implementation

@NachoSoto NachoSoto requested a review from a team August 8, 2023 18:32
Comment thread Sources/Networking/HTTPClient/HTTPClient.swift Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is now trivial to add a second enum for the new endpoints, which can be passed to HTTPClient and it'll make a request to the right place.
That way it will be impossible to make requests to the new server for paths that shouldn't go there.

@NachoSoto NachoSoto force-pushed the nacho/sdk-3162-ios-support-alternative-endpoint-for-offerings branch from 5c5cc9f to 6302bd4 Compare August 8, 2023 18:33

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@NachoSoto NachoSoto force-pushed the nacho/sdk-3162-ios-support-alternative-endpoint-for-offerings branch from 36f6942 to 377711d Compare August 9, 2023 15:26
This paves the way to add a second set of paths with a separate server URL to be able to shed requests to offerings and product entitlement mapping to a separate server.

### Changes:
- New `HTTPRequestPath` with the same properties as `HTTPRequest.Path` + a new `serverHostURL`
- Moved proxy logic from `SystemInfo`/`HTTPClient` to `HTTPRequestPath`
- Simplified `HTTPRequest` implementation
@NachoSoto NachoSoto force-pushed the nacho/sdk-3162-ios-support-alternative-endpoint-for-offerings branch from 377711d to cdbb2bb Compare August 10, 2023 14:59
@NachoSoto NachoSoto enabled auto-merge (squash) August 10, 2023 14:59
@NachoSoto NachoSoto force-pushed the nacho/sdk-3162-ios-support-alternative-endpoint-for-offerings branch from cdbb2bb to 2d226d7 Compare August 10, 2023 16:37
@NachoSoto NachoSoto force-pushed the nacho/sdk-3162-ios-support-alternative-endpoint-for-offerings branch from 02d6508 to 3d2add4 Compare August 10, 2023 20:12
@NachoSoto NachoSoto merged commit 8335243 into main Aug 10, 2023
@NachoSoto NachoSoto deleted the nacho/sdk-3162-ios-support-alternative-endpoint-for-offerings branch August 10, 2023 22:23
NachoSoto added a commit that referenced this pull request Aug 11, 2023
_This release is compatible with Xcode 15 beta 6 and visionOS beta 3_

### Bugfixes
* `Xcode 15`: fix non-`visionOS` build by replacing `.custom` platform
(#3005) via NachoSoto (@NachoSoto)
### Other Changes
* `Integration Tests`: test for
`SignatureVerificationMode.informational` and receipt posting when
fetching `CustomerInfo` (#3000) via NachoSoto (@NachoSoto)
* `Custom Entitlement Computation`: fixed `visionOS` build (#2999) via
NachoSoto (@NachoSoto)
* `HTTPClient`: extracted `HTTPRequestPath` protocol (#2986) via
NachoSoto (@NachoSoto)
* `CI`: add `visionOS` build (#2990) via NachoSoto (@NachoSoto)

---------

Co-authored-by: NachoSoto <ignaciosoto90@gmail.com>
MarkVillacampa pushed a commit that referenced this pull request Sep 6, 2023
This paves the way to add a second set of paths with a separate server
URL to be able to shed requests to offerings and product entitlement
mapping to a separate server.

### Changes:
- New `HTTPRequestPath` with the same properties as `HTTPRequest.Path` +
a new `serverHostURL`
- Moved proxy logic from `SystemInfo`/`HTTPClient` to `HTTPRequestPath`
- Simplified `HTTPRequest` implementation
MarkVillacampa pushed a commit that referenced this pull request Sep 6, 2023
_This release is compatible with Xcode 15 beta 6 and visionOS beta 3_

### Bugfixes
* `Xcode 15`: fix non-`visionOS` build by replacing `.custom` platform
(#3005) via NachoSoto (@NachoSoto)
### Other Changes
* `Integration Tests`: test for
`SignatureVerificationMode.informational` and receipt posting when
fetching `CustomerInfo` (#3000) via NachoSoto (@NachoSoto)
* `Custom Entitlement Computation`: fixed `visionOS` build (#2999) via
NachoSoto (@NachoSoto)
* `HTTPClient`: extracted `HTTPRequestPath` protocol (#2986) via
NachoSoto (@NachoSoto)
* `CI`: add `visionOS` build (#2990) via NachoSoto (@NachoSoto)

---------

Co-authored-by: NachoSoto <ignaciosoto90@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants