diff options
| author | 2017-07-09 18:37:14 -0400 | |
|---|---|---|
| committer | 2017-07-11 18:34:30 -0400 | |
| commit | 28c35756790bfad06e339b82c551ab521268561b (patch) | |
| tree | 2eb47ab96bde081a84c5dd7c8107a21cb8a3511c /src/web_service/web_backend.cpp | |
| parent | web_service: Add CMake flag to enable. (diff) | |
| download | yuzu-28c35756790bfad06e339b82c551ab521268561b.tar.gz yuzu-28c35756790bfad06e339b82c551ab521268561b.tar.xz yuzu-28c35756790bfad06e339b82c551ab521268561b.zip | |
web_backend: Specify api-version on JSON post.
Diffstat (limited to '')
| -rw-r--r-- | src/web_service/web_backend.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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 @@ | |||
| 9 | 9 | ||
| 10 | namespace WebService { | 10 | namespace WebService { |
| 11 | 11 | ||
| 12 | static constexpr char API_VERSION[]{"1"}; | ||
| 12 | static constexpr char ENV_VAR_USERNAME[]{"CITRA_WEB_SERVICES_USERNAME"}; | 13 | static constexpr char ENV_VAR_USERNAME[]{"CITRA_WEB_SERVICES_USERNAME"}; |
| 13 | static constexpr char ENV_VAR_TOKEN[]{"CITRA_WEB_SERVICES_TOKEN"}; | 14 | static constexpr char ENV_VAR_TOKEN[]{"CITRA_WEB_SERVICES_TOKEN"}; |
| 14 | 15 | ||
| @@ -44,7 +45,8 @@ void PostJson(const std::string& url, const std::string& data) { | |||
| 44 | 45 | ||
| 45 | cpr::PostAsync(cpr::Url{url}, cpr::Body{data}, cpr::Header{{"Content-Type", "application/json"}, | 46 | cpr::PostAsync(cpr::Url{url}, cpr::Body{data}, cpr::Header{{"Content-Type", "application/json"}, |
| 46 | {"x-username", GetUsername()}, | 47 | {"x-username", GetUsername()}, |
| 47 | {"x-token", GetToken()}}); | 48 | {"x-token", GetToken()}, |
| 49 | {"api-version", API_VERSION}}); | ||
| 48 | } | 50 | } |
| 49 | 51 | ||
| 50 | } // namespace WebService | 52 | } // namespace WebService |