mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-14 00:30:31 +00:00
AbstractHafasClientInterfaceProvider: Append '?' to constraint in jsonLocMatch().
This commit is contained in:
parent
d1f03705d0
commit
391ee47f3a
1 changed files with 3 additions and 3 deletions
|
@ -369,12 +369,12 @@ public abstract class AbstractHafasClientInterfaceProvider extends AbstractHafas
|
|||
|
||||
protected final SuggestLocationsResult jsonLocMatch(final CharSequence constraint, int maxLocations)
|
||||
throws IOException {
|
||||
checkNotNull(constraint);
|
||||
if (maxLocations == 0)
|
||||
maxLocations = DEFAULT_MAX_LOCATIONS;
|
||||
final String loc = "{\"name\":" + JSONObject.quote(constraint + "?") + ",\"meta\":false}";
|
||||
final String request = wrapJsonApiRequest("LocMatch",
|
||||
"{\"input\":{\"field\":\"S\",\"loc\":{\"name\":" + JSONObject.quote(checkNotNull(constraint).toString())
|
||||
+ ",\"meta\":false},\"maxLoc\":" + maxLocations + "}}",
|
||||
false);
|
||||
"{\"input\":{\"field\":\"S\",\"loc\":" + loc + ",\"maxLoc\":" + maxLocations + "}}", false);
|
||||
|
||||
final HttpUrl url = requestUrl(request);
|
||||
final CharSequence page = httpClient.get(url, request, "application/json");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue