Skip to content

Commit cfc1124

Browse files
olami-developersolami-developers
authored andcommitted
add utf-8 to http connection
1 parent fe82197 commit cfc1124

File tree

8 files changed

+9
-6
lines changed

8 files changed

+9
-6
lines changed

examples/async-text-chatbot-example/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<parent>
1414
<groupId>ai.olami</groupId>
1515
<artifactId>olami-java-client-sdk</artifactId>
16-
<version>1.1.0</version>
16+
<version>1.1.1</version>
1717
<relativePath>../../pom.xml</relativePath>
1818
</parent>
1919

examples/dump-nli-results-example/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<parent>
1414
<groupId>ai.olami</groupId>
1515
<artifactId>olami-java-client-sdk</artifactId>
16-
<version>1.1.0</version>
16+
<version>1.1.1</version>
1717
<relativePath>../../pom.xml</relativePath>
1818
</parent>
1919

examples/speech-input-example/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<parent>
1414
<groupId>ai.olami</groupId>
1515
<artifactId>olami-java-client-sdk</artifactId>
16-
<version>1.1.0</version>
16+
<version>1.1.1</version>
1717
<relativePath>../../pom.xml</relativePath>
1818
</parent>
1919

examples/text-input-example/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<parent>
1414
<groupId>ai.olami</groupId>
1515
<artifactId>olami-java-client-sdk</artifactId>
16-
<version>1.1.0</version>
16+
<version>1.1.1</version>
1717
<relativePath>../../pom.xml</relativePath>
1818
</parent>
1919

lib/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<parent>
1313
<groupId>ai.olami</groupId>
1414
<artifactId>olami-java-client-sdk</artifactId>
15-
<version>1.1.0</version>
15+
<version>1.1.1</version>
1616
</parent>
1717

1818
<properties>

lib/src/main/java/ai/olami/cloudService/SpeechRecognizer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,7 @@ private APIResponse uploadAudioData(
483483
if ((cookies != null) && (!cookies.equals(""))) {
484484
httpConnection.setRequestProperty("Cookie", cookies);
485485
}
486+
httpConnection.setRequestProperty("contentType", "utf-8");
486487
httpConnection.setConnectTimeout(getTimeout());
487488

488489
HttpClient httpClient = null;
@@ -527,6 +528,7 @@ private APIResponse sendGetResultsRequest(
527528
final HttpURLConnection httpConnection = (HttpURLConnection) url.openConnection();
528529
httpConnection.setRequestMethod("GET");
529530
httpConnection.setRequestProperty("Cookie", cookies);
531+
httpConnection.setRequestProperty("contentType", "utf-8");
530532
httpConnection.setConnectTimeout(getTimeout());
531533

532534
HttpClient httpClient = null;

lib/src/main/java/ai/olami/cloudService/TextRecognizer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ private APIResponse sendRequest(
107107
final URL url = new URL(getConfiguration().getBaseRequestURL(apiName));
108108
final HttpURLConnection httpConnection = (HttpURLConnection) url.openConnection();
109109
httpConnection.setRequestMethod("POST");
110+
httpConnection.setRequestProperty("contentType", "utf-8");
110111
httpConnection.setConnectTimeout(getTimeout());
111112

112113
HttpClient httpClient = null;

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>ai.olami</groupId>
66
<artifactId>olami-java-client-sdk</artifactId>
7-
<version>1.1.0</version>
7+
<version>1.1.1</version>
88
<packaging>pom</packaging>
99

1010
<name>OLAMI Java Client SDK</name>

0 commit comments

Comments
 (0)