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

Add an API Endpoint /getVersion #13

Open
madhavajay opened this issue May 5, 2020 · 1 comment
Open

Add an API Endpoint /getVersion #13

madhavajay opened this issue May 5, 2020 · 1 comment

Comments

@madhavajay
Copy link
Collaborator

This will send a header with the current version.
Additionally the logic will either send a status ok, or an upgrade command.

Later we can add code to check the user-agent and version etc.

For now just short circuit to upgrade command so we can integrate / test this in the app code bases.
Ok command:
Custom Header:
"X-API-Version": {{current version}}

{
    "status": "200",
    "message": "App version ok"
}

Upgrade command:
Custom Header:
"X-API-Version": {{current version}}

{
    "status": "426",
    "message": "Please upgrade your client"
}
@zssz
Copy link
Member

zssz commented May 5, 2020

X-API-Version header for specifying the version the client is expecting. Great!

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

No branches or pull requests

2 participants