How to obtain the query string in a GET with Java HttpServer/HttpExchange?
The following: httpExchange.getRequestURI().getQuery() will return string in format similar to this: “field1=value1&field2=value2&field3=value3…” so you could simply parse string yourself, this is how function for parsing could look like: public Map<String, String> queryToMap(String query) { if(query == null) { return null; } Map<String, String> result = new HashMap<>(); for (String param : query.split(“&”)) { String[] entry … Read more