[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 Jacob Laursen
parent 5e059ba044
commit 00dae6f615
2 changed files with 2 additions and 1 deletions

View File

@ -275,7 +275,7 @@ public class BoschHttpClient extends HttpClient {
logger.trace("Create request for http client {}", this.toString());
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

@ -100,6 +100,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