I'm trying to deploy a springcloud data flow stream like this:
time | http-request --http-method-expression='POST' --url-expression='http://mydomain.fake/myservice?myparams=myvalues' | log
The stream deploy without errors, but when I check the http-request log I can see a exception. Obviously, the stream not works
Property or field 'POST' cannot be found on object of type 'org.springframework.messaging.support.GenericMessage'
I checked the HttpRequestFunctionProperties class from github, but I didn't get any clue about my fault.
Any help please?
Update 1:
I get it. It works with --http-method-expression=new String('POST')
BUT only when the stream is updated . I cant deploy the stream directly with this param ...
Thanks !!!
The error indicates that the SpEL parser is interpreting POST
as a field on the Message (the default evaluation context). The expression 'POST'
is not being parsed correctly as a literal string. This is most likely due to some escaping problem. Try what Gary suggests.