You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If in the cf api command the url has a trailing slash cf api <the_api_url>/ the cf curl command behaves quite unexpected. The cf api command does not return any error or warning if doing so which means, you do not see any issue to enter the api url with a trailing slash as a user.
The command cf curl v3/service_brokers still works but cf curl v3/service_brokers?names=some_name returns
My assumption is, that internally, the api url is concatenated with the path from the curl command which leads to a double slash. This is an unexpected behaviour from my perspective and should be fixed, either by trowing an error if the url contains a trailing slash or, and I think that this would be the better solution, parse the url and remove the trailing slash when calling cf api.
I am running on cf version 8.7.3
Kind regards,
Oliver
The text was updated successfully, but these errors were encountered:
Hello,
I discovered the following unexpected behaviour when using the cf curl command.
Everything works as expected, when logging in the following way:
Then, executing
cf curl v3/service_brokers
returns all service brokers andcf curl v3/service_brokers?names=some_name
in my case returns{"pagination":{"total_results":0,"total_pages":1,"first":{"href":"https://api.<redacted>/v3/service_brokers?names=some_name\u0026page=1\u0026per_page=50"},"last":{"href":"https://api.<redacted>/v3/service_brokers?names=some_name\u0026page=1\u0026per_page=50"},"next":null,"previous":null},"resources":[]}
and thats totally fine.
If in the
cf api
command the url has a trailing slashcf api <the_api_url>/
thecf curl
command behaves quite unexpected. Thecf api
command does not return any error or warning if doing so which means, you do not see any issue to enter the api url with a trailing slash as a user.The command
cf curl v3/service_brokers
still works butcf curl v3/service_brokers?names=some_name
returns{"errors":[{"detail":"Unknown request","title":"CF-NotFound","code":10000}]}
My assumption is, that internally, the api url is concatenated with the path from the curl command which leads to a double slash. This is an unexpected behaviour from my perspective and should be fixed, either by trowing an error if the url contains a trailing slash or, and I think that this would be the better solution, parse the url and remove the trailing slash when calling
cf api
.I am running on cf version 8.7.3
Kind regards,
Oliver
The text was updated successfully, but these errors were encountered: