howMany and SetMaximumResultSize don't appear to be working

Hi I am trying to increase the default sample size from 15 to 50

I am setting the howMany value here

String howManyParam = URLEncoder.encode("howMany=${sampleSize}", 'UTF-8') String urlBase = 'https://flightxml.flightaware.com/json/FlightXML2/Search?' + howManyParam + '&query='

where

@Inject @ConfigProperty(name = 'heimdall.gateway.flightaware.sample.size', defaultValue = '50') int sampleSize;

where

String url = "https://flightxml.flightaware.com/json/FlightXML2/SetMaximumResultSize?max_size=${sampleSize}"

and with SetMaximumResultSize defined here

String url = "https://flightxml.flightaware.com/json/FlightXML2/SetMaximumResultSize?max_size=${sampleSize}"

Thanks in advance for your help

1 Like

Generally you should not need to encode the entire URL, only string values within the arguments.

Your attempt to encode the entire URL is likely escaping the “?” and “&”, which is causing improper decoding at the server-side.

legend sorted thanks mate