Skip to content

Commit c8f35e8

Browse files
committed
Translator: add User-Agent header
1 parent c79f917 commit c8f35e8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/space/dynomake/libretranslate/Translator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public TranslateResponse translateDetect(@NonNull String from, @NonNull String t
3535

3636
httpConn.setRequestProperty("accept", "application/json");
3737
httpConn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
38+
httpConn.setRequestProperty("User-Agent", "Mozilla/5.0");
3839

3940
httpConn.setDoOutput(true);
4041

0 commit comments

Comments
 (0)