Params endpoint that keeps empty string
See original GitHub issueAs mentioned in #598 we need a simpler version of params
:
- Do not filter empty strings
- Do not split values by
,
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Empty string in query parameter is considered missing #2823
Hi team. I have an Update endpoint on some data in my backend. Every field that is sent to the endpoint will replace...
Read more >How to send empty string to int params error - Stack Overflow
1 Answer 1 ... You can add [Route("{a?}")] to your endpoint and it will ignore nonnumerical values as empty strings.
Read more >Use empty string, null or remove empty property in API request ...
8 Answers 8 · Yes, empty string is a value and I use null for references. Mixing values with references is one of...
Read more >21.2 Validating Null and Empty Strings
An empty string is represented as "" . It is a character sequence of zero characters. A null string is represented by null...
Read more >Search REST API Reference - Algolia
The query parameters used during the generation of a secured API key can contain ... Use an empty string (default) to browse all...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There are no tests for this, so it looks like removing
.flatMap(_.split(","))
fromio.finch.Endpoints.requestParams
and.filter(_.nonEmpty)
fromio.finch.Endpoints.params
should do the trick.Keeping with the original ‘principle of least surprise’ design objective, I’d recommend
paramsNonEmpty
andparamsNel
not apply split+flatMap to the value they get back fromrequestParams
, but that they do keep the.filter(_.nonEmpty)
calls they currently have.Does that seem right? I can submit a PR if it’s really that simple.
Great; see #625