Skip to content

Commit

Permalink
fix query
Browse files Browse the repository at this point in the history
  • Loading branch information
yevheniyJ committed Nov 18, 2024
1 parent 6762c99 commit 51f7ac8
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

import java.io.InputStream;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.function.BiPredicate;

Expand Down Expand Up @@ -558,7 +560,8 @@ public void installApplication(String url) {
@Override
@SneakyThrows
public Optional<String> findManifestUrl(String id) {
var url = new URL("https://developer.app.crowdin.net/items/Item?filter={\"slug\":{\"_eq\":\"" + id + "\"}}&fields=manifest");
var query = URLEncoder.encode( "{\"slug\":{\"_eq\":\"" + id + "\"}}", StandardCharsets.UTF_8);
var url = new URL("https://developer.app.crowdin.net/items/Item?filter=" + query + "&fields=manifest");
var res = new String(url.openStream().readAllBytes());
JSONObject json = new JSONObject(res);
var apps = (JSONArray) json.get("data");
Expand Down

0 comments on commit 51f7ac8

Please sign in to comment.