'How to pass a parameter to a Spring Cloud Function?
I'm following the Spring Cloud Function tutorial.
In the example, they are calling the revert bean with this command:
curl localhost:8080/reverseString -H "Content-Type: text/plain" -d "abc"
I like to call the endpoint from a browser/postman as a GET request.
So I was looking to orchestrate a URL with a query parameter, that may look like localhost:8080/reverseString?input=abc
But:
- It is not clear to me what should be the name of the parameter?
- Seems like no matter what method name we put, they all get
HTTP 200response, with no response body.reverseStringggg,reve...
Solution 1:[1]
You can pass it as localhost:8080/reverseString/abc
That said, I've raise the issue to explicitly support http parameters - https://github.com/spring-cloud/spring-cloud-function/issues/864
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Oleg Zhurakousky |
