[boschshc] Upgrade to REST API version 3.2 (#15053) (#15067)

closes #15053

Signed-off-by: David Pace <dev@davidpace.de>
This commit is contained in:
David Pace 2023-06-11 17:52:26 +02:00 committed by GitHub
parent 5e1c9e81f1
commit 13a036e30d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -287,7 +287,7 @@ public class BoschHttpClient extends HttpClient {
logger.trace("Create request for http client {}", this);
Request request = this.newRequest(url).method(method).header("Content-Type", "application/json")
.header("api-version", "2.1") // see https://github.com/BoschSmartHome/bosch-shc-api-docs/issues/46
.header("api-version", "3.2") // see https://github.com/BoschSmartHome/bosch-shc-api-docs/issues/80
.timeout(10, TimeUnit.SECONDS); // Set default timeout
if (content != null) {

View File

@ -160,6 +160,7 @@ class BoschHttpClientTest {
void createRequest() {
Request request = httpClient.createRequest("https://127.0.0.1", HttpMethod.GET);
assertNotNull(request);
assertEquals("3.2", request.getHeaders().get("api-version"));
}
@Test