I need to extract a header when an http response comes in, and inject a header when a request goes out. These headers are not specific to the lower level pages/modules/components/children...
I have an API module that formats requests, checks responses, extracts headers, etc. Currently I pass the header value to inject into the API module from each child who makes an API call, and receive back the extracted header value within each child API call, to pass those up to the root? It's not so much the passing through the hierarchy at issue (it's a pretty flat hierarchy as it is) that concerns me. It's more about the coupling of concerns. I feel like I'm missing something. What I want is hit an api, such as Api.sendJson modelToSend, which creates a task which is performed with the local messages such as (modelSendFailedMsg error) and (modelSendSuccess responseVal). But the coupling mentioned above means I have to do Api.sendJson modelToSend globalValueToInjectIntoHeader, and then coming back, rather than having a single task with local messages, I need a local task with the local model, and I need a global/root task to handle processing the extracted header values. I have read the other related threads, but nothing stood out as a more cleanly architected solution. Has anybody come up with a more elegant solution for these global service layers? -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.