Implement Extracting & Caching State:Store and LocationHint from Konductor responses and Attaching to subsequent requests#177
Conversation
…edge requests so all the modules need to pass the path without ee. buildEdgeRequest API now also takes in locationHint to generate the URL.
…uent request URL to contain the location hint and the request body to contain the state
| end if | ||
|
|
||
| url = _adb_buildEdgeRequestURL(configId, _adb_generate_UUID(), m._EDGE_REQUEST_PATH, edgeDomain) | ||
| url = _adb_buildEdgeRequestURL(configId, _adb_generate_UUID(), m._EDGE_REQUEST_PATH, invalid, edgeDomain) |
There was a problem hiding this comment.
nit:
You don't have to do it now but in the future, if you add any more params, I recommend switching to either a builder pattern or modifying the method to accept an object, making it more manageable.
params = {
configId: "yourConfigId",
requestId: "yourRequestId",
path: "yourPath",
locationHint: yourLocationHint,
edgeDomain: yourEdgeDomain
}
url = _adb_buildEdgeRequestURL(params)
There was a problem hiding this comment.
Yes, that sounds good.
…asses to handle locationHint and statestore. Updated tests
|
LGTM |
| return | ||
| end if | ||
|
|
||
| m._state = state |
There was a problem hiding this comment.
When setting or retrieving the state store data, do you need to consider the maxAge field which defines how long the element should be stored?
https://github.com/adobe/aepsdk-edge-ios/blob/dev/Sources/EdgeNetworkHandlers/StoreResponsePayload.swift#L27
There was a problem hiding this comment.
I will update it to match the mobile SDK, in case we decide to persist these. I should have the changes in by today mostly.
There was a problem hiding this comment.
@kevinlind as per our discussion I will take this as a separate task/PR #178
Description
This PR sets foundation for the following changes and also future changes e.g: handling resetIdentities etc.
Sample payload
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: