Skip to content

Commit

Permalink
[boschshc] Upgrade to REST API version 3.2 (openhab#15053)
Browse files Browse the repository at this point in the history
closes openhab#15053

Signed-off-by: David Pace <dev@davidpace.de>
  • Loading branch information
david-pace committed Jun 8, 2023
1 parent 8d0c9f2 commit f8a2a87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ public Request createRequest(String url, HttpMethod method, @Nullable Object con
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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ void doPairing() throws InterruptedException {
void createRequest() {
Request request = httpClient.createRequest("https://127.0.0.1", HttpMethod.GET);
assertNotNull(request);
assertEquals("3.2", request.getHeaders().get("api-version"));
}

@Test
Expand Down

0 comments on commit f8a2a87

Please sign in to comment.