Skip to content

Fallback mechanism #90

@fawazahmed0

Description

@fawazahmed0

Fallback URL:

https://{date}.currency-api.pages.dev/{apiVersion}/{endpoint}

Pseudo code:
For example, if you want to fetch eur:

Fetch https://cdn.jsdelivr.net/npm/@fawazahmed0/currency-api@latest/v1/currencies/eur.min.json
If above url fails, then try fetching https://latest.currency-api.pages.dev/v1/currencies/eur.min.json
If above url fails, then try fetching https://cdn.jsdelivr.net/npm/@fawazahmed0/currency-api@latest/v1/currencies/eur.json
If above url fails, then try fetching https://latest.currency-api.pages.dev/v1/currencies/eur.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions