Allow empty query parameters #978
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
The cf command-line client supports mapping of empty hosts.
For instance (getting an empty host for domain, one result): /v2/routes?inline-relations-depth=1&q=host%3A%3Bdomain_guid%3A6906bee2-0115-47f6-b7d1-3ef1e455e8e1
"%3A%3B" -> ":;"
The v3 client does not support this feature. Empty parameters are skiped and not set as parameters in the request url.
The following problem occurrs. You have two hosts mapped to domain and application.
When you try to get this empty host all of the hosts for this domain are returned.
Example:
ListSpaceRoutesRequest.Builder requestBuilder = ListSpaceRoutesRequest.builder();
requestBuilder.host(""); -> Ignored in the request (all host are returned)
This pull request removes the checks for empty parameters and allows using empty parametrs.
Could you please review it?
Regards,
Ivan