You would need to URI encode it... like %20 or something
There's a list of characters that typically need URI encoded.
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Lee Paul
Sent: Tuesday, October 18, 2022 3:10 PM
To: 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 [CAUTION! This email originated outside of the organization. Please do not open attachments or click links from an unknown or suspicious origin.]
As an Amazon Associate we earn from qualifying purchases.