Skip to content

Commit

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

closes openhab#15053

Signed-off-by: David Pace <dev@davidpace.de>
Signed-off-by: Thomas Burri <thomas.burri@alstomgroup.com>
  • Loading branch information
david-pace authored and tburri-alstom committed Jun 19, 2023
1 parent c016114 commit 18d5fbf
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 18d5fbf

Please sign in to comment.