Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Future proof options for mithril client #1878

Closed
3 of 7 tasks
jpraynaud opened this issue Aug 5, 2024 · 0 comments · Fixed by #1890
Closed
3 of 7 tasks

Future proof options for mithril client #1878

jpraynaud opened this issue Aug 5, 2024 · 0 comments · Fixed by #1890
Assignees
Labels
feature 🚀 New implemented feature

Comments

@jpraynaud
Copy link
Member

jpraynaud commented Aug 5, 2024

Why

The Mithril client needs to be configurable in a future proof way: we don't want to update the API surface whenever a new option is needed. For example, in #1720, we have expressed the need to add a custom HTTP header.

What

Implement an optional mechanism for the Mithril client and provide a first option for custom HTTP Headers.
In order to implement a stable mechanism we will represent the options as a HashMap<OptionName, OptionValue> where OptionName is a String and OptionValue is an Enum.

How

  • Implement a new client constructor in WASM which has a new parameter for options of the client ,or modify the current constructor to include a new optional parameter
  • Have the client builder use the options to build the client
  • Update the explorer
  • Update the doc and examples (+ make an example with additional headers)
  • Announce breaking change:
    • in the CHANGELOG
    • in the next distribution

Related issues

#1720

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🚀 New implemented feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants