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

Support https connections to API #11

Open
rmorrin opened this issue Jul 22, 2018 · 1 comment
Open

Support https connections to API #11

rmorrin opened this issue Jul 22, 2018 · 1 comment

Comments

@rmorrin
Copy link
Owner

rmorrin commented Jul 22, 2018

The paid plans for Fixer allow for https connections to the API.

Currently, FixerSharp will always connect over the http endpoint. It would be useful if we could provide the option to use https for users with paid accounts.

Considerations:

  1. How do we enable this configuration option? As far as I know, there's no way to validate if a given API key has access to the https endpoint. We could allow consuming application to enable it manually by something like Fixer.UseHttps(); - similar to how the API key is set now.
  2. If the https endpoint is used on a free (basic) account, all calls are rejected with an error message (though still 200 response). In the current implementation, this will fail when trying to parse the exchange rate data. May be worth trying to account for this and throw a more meaningful exception.
  3. Do unit tests need to be modified? Depending on the solution to 1. we may have to allow https to be enabled manually in [TestInitialize]
@naveddeshmukh
Copy link

Fixer.UseHttps() sounds goods. It gives the developer flexibility to enable/disable using https protocol and it would allow us to avoid writing magic code for checking for https support (if there is any such mechanism).

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

No branches or pull requests

2 participants