From 28c35756790bfad06e339b82c551ab521268561b Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 9 Jul 2017 18:37:14 -0400 Subject: [PATCH] web_backend: Specify api-version on JSON post. --- src/web_service/web_backend.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/web_service/web_backend.cpp b/src/web_service/web_backend.cpp index 6d5470157..13e4555ac 100644 --- a/src/web_service/web_backend.cpp +++ b/src/web_service/web_backend.cpp @@ -9,6 +9,7 @@ namespace WebService { +static constexpr char API_VERSION[]{"1"}; static constexpr char ENV_VAR_USERNAME[]{"CITRA_WEB_SERVICES_USERNAME"}; static constexpr char ENV_VAR_TOKEN[]{"CITRA_WEB_SERVICES_TOKEN"}; @@ -44,7 +45,8 @@ void PostJson(const std::string& url, const std::string& data) { cpr::PostAsync(cpr::Url{url}, cpr::Body{data}, cpr::Header{{"Content-Type", "application/json"}, {"x-username", GetUsername()}, - {"x-token", GetToken()}}); + {"x-token", GetToken()}, + {"api-version", API_VERSION}}); } } // namespace WebService