If you want to use space in URL, you must use %20. So, in your example it would be:
/students/name/John%20Smith
Not sure what the problem with using LIKE?
---------------------------------------------------
Nadir Amra
e-mail: amra@xxxxxxxxxx
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> on behalf of Lee Paul <lee_paul@xxxxxxxxxxxxxxxx>
Date: Tuesday, October 18, 2022 at 2:22 PM
To: midrange-l@xxxxxxxxxxxxxxxxxx <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: [EXTERNAL] REST APIs with space in the parameter and with LIKE in the SQL
I am creating REST Web Services using SQL as a Web service and am stuck on two things.
1. Having a space in the parameter.
I need to select records from the DB where there may be a space in the selection parameter.
For example, for API /students/name/{name} I would specify /students/name/John Smith, but I can't seem to get this to work.
1. Using LIKE in the SQL.
I would also like to be able to select using the SQL LIKE comparison. For example, the SQL for /students/name/{name} would be:
SELECT * FROM STUDENTDB WHERE "fullName" LIKE ?
Thank you in advance for any help. It is greatly appreciated!
- Lee
Lee Paul
Surround Technologies, LLC
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
https://archive.midrange.com/midrange-l .
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.