Skip to content

Commit f6a855a

Browse files
committed
using PUT instead of POST
1 parent 206d4ac commit f6a855a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/InkRecognition/quickstart/RecognizeInk.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// <imports>
44
import org.apache.http.HttpEntity;
55
import org.apache.http.client.methods.CloseableHttpResponse;
6-
import org.apache.http.client.methods.HttpPost;
6+
import org.apache.http.client.methods.HttpPut;
77
import org.apache.http.entity.StringEntity;
88
import org.apache.http.impl.client.CloseableHttpClient;
99
import org.apache.http.impl.client.HttpClients;
@@ -42,7 +42,7 @@ static void recognizeInk(String requestData) {
4242
// <sendRequest>
4343
static String sendRequest(String endpoint, String apiAddress, String subscriptionKey, String requestData) {
4444
try (CloseableHttpClient client = HttpClients.createDefault()) {
45-
HttpPost request = new HttpPost(endpoint + apiAddress);
45+
HttpPut request = new HttpPut(endpoint + apiAddress);
4646
// Request headers.
4747
request.setHeader("Content-Type", "application/json");
4848
request.setHeader("Ocp-Apim-Subscription-Key", subscriptionKey);

0 commit comments

Comments
 (0)