asfadmin / Discovery-asf_search

BSD 3-Clause "New" or "Revised" License
124 stars 43 forks source link

[Feature] All HyP3 API URLs can end with '/' #281

Open jacquelynsmale opened 5 months ago

jacquelynsmale commented 5 months ago

Is your feature request related to a problem? Please describe. When changing the HyP3 API URL in Preferences > On Demand Presets to an API other than hyp3-api, if there is a / at the end of the URL (ex: https://hyp3-test.asf.alaska.edu/ instead of https://hyp3-test.asf.alaska.edu), the job will get an error on submission. Note that when the API is hyp3-api, the '/' at the end of URL will successfully submit a job (i.e. https://hyp3-api.asf.alaska.edu/ and https://hyp3-api.asf.alaska.edu both successfully submit jobs).

Describe the solution you'd like All HyP3 API URLs will be recognized even with the trailing '/' (ex: https://hyp3-test.asf.alaska.edu/ is a valid URL).

Describe alternatives you've considered One could simply add the correct URL without the trailing '/'.

Additional context While this isn't necessarily a breaking bug, it did cause some confusion on my end and might warrant a minor fix. Also, the actual number of users who will come across this issue is minimal. Feel free to ignore this issue, too!