closes #15053 Signed-off-by: David Pace <dev@davidpace.de>
This commit is contained in:
parent
5e1c9e81f1
commit
13a036e30d
|
@ -287,7 +287,7 @@ public class BoschHttpClient extends HttpClient {
|
||||||
logger.trace("Create request for http client {}", this);
|
logger.trace("Create request for http client {}", this);
|
||||||
|
|
||||||
Request request = this.newRequest(url).method(method).header("Content-Type", "application/json")
|
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
|
.timeout(10, TimeUnit.SECONDS); // Set default timeout
|
||||||
|
|
||||||
if (content != null) {
|
if (content != null) {
|
||||||
|
|
|
@ -160,6 +160,7 @@ class BoschHttpClientTest {
|
||||||
void createRequest() {
|
void createRequest() {
|
||||||
Request request = httpClient.createRequest("https://127.0.0.1", HttpMethod.GET);
|
Request request = httpClient.createRequest("https://127.0.0.1", HttpMethod.GET);
|
||||||
assertNotNull(request);
|
assertNotNull(request);
|
||||||
|
assertEquals("3.2", request.getHeaders().get("api-version"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue