Skip to content

Support https connections to API #11

@rmorrin

Description

@rmorrin

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]

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions