[英]Headers in http source Spring cloud flow
I am using postman to POST a http request with a file in form-data and want to pass the filename as a header. 我正在使用postman来发布带有form-data文件的http请求,并希望将文件名作为标题传递。 With file as a sink i want to get that file and save it in the name of the header value filename which i passed in the http request.
使用文件作为接收器我想获取该文件并将其保存在我在http请求中传递的标头值文件名的名称中。 Below is what i tried with spring cloud flow and i am not getting the header "filename" in the sink side the file is getting saved in the name "null"
下面是我尝试使用spring cloud flow并且我没有在sink端获取头文件“filename”,文件被保存在名称“null”中
stream create --name myfilestream --definition "http --mapped-request-headers=foo --port=5555 | file --directory-expression="'Desktop' + 'sr'" --name-expression="headers['foo']" --deploy
Could someone throw some light on this. 有人会对此有所了解吗?
If you use Kafka Binder , you should consider to use this option: 如果您使用Kafka Binder,则应考虑使用此选项:
spring.cloud.stream.kafka.binder.headers The list of custom headers that will be transported by the binder.
spring.cloud.stream.kafka.binder.headers将由活页夹传输的自定义标头列表。
Default: empty.
默认值:空。
By default custom headers aren't transported. 默认情况下,不会传输自定义标头。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.