0

I'm working on a Microservice that receives webhooks, the idea is to use path variables for some processing down stream,

/webhooks/{foo}/{bar}/{baz}

for example

/webhooks/sony/pony/tony would populate foo=sony; bar=pony; baz=tony.

Can't figure how to make it work in spring cloud function web.

Anadi Misra
  • 1,925
  • 4
  • 39
  • 68

1 Answers1

1

This was never the purpose of spring-cloud-function to replace spring-mvc etc. Also, Function has only one argument, so what you can do is have Function<Message, ...> and we translate HTTP request into Message where body will turn into payload and HTTP headers will turn into Message headers.

Oleg Zhurakousky
  • 5,820
  • 16
  • 17
  • Can't send headers as this url typically receives web hooks from Gitlab and Jira etc. I switched to a webflux endpoint calling stream bridge. – Anadi Misra Jul 11 '22 at 10:24