Skip to content

Commit 3fa28bb

Browse files
committed
fix: Fix getUsage HTTP request
1 parent b11530f commit 3fa28bb

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## Unreleased
88
### Fixed
99
* Changed document translation to poll the server every 5 seconds. This should greatly reduce observed document translation processing time.
10+
* Fix getUsage request to be a HTTP GET request, not POST.
1011

1112

1213
## [1.2.0] - 2023-03-22

Diff for: deepl-java/src/main/java/com/deepl/api/Translator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ public List<TextResult> translateText(
247247
* @throws DeepLException If any error occurs while communicating with the DeepL API.
248248
*/
249249
public Usage getUsage() throws DeepLException, InterruptedException {
250-
HttpResponse response = httpClientWrapper.sendRequestWithBackoff("/v2/usage");
250+
HttpResponse response = httpClientWrapper.sendGetRequestWithBackoff("/v2/usage");
251251
checkResponse(response, false, false);
252252
return jsonParser.parseUsage(response.getBody());
253253
}

0 commit comments

Comments
 (0)