question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Params endpoint that keeps empty string

See original GitHub issue

As mentioned in #598 we need a simpler version of params:

  1. Do not filter empty strings
  2. Do not split values by ,

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
chbrowncommented, Jul 28, 2016

There are no tests for this, so it looks like removing .flatMap(_.split(",")) from io.finch.Endpoints.requestParams and .filter(_.nonEmpty) from io.finch.Endpoints.params should do the trick.

Keeping with the original ‘principle of least surprise’ design objective, I’d recommend paramsNonEmpty and paramsNel not apply split+flatMap to the value they get back from requestParams, 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.

0reactions
chbrowncommented, Aug 14, 2016

Great; see #625

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found