Retrieve HTTP Method

Hello guys,

Do you know if we can retrieve the HTTP Method from a webhook as metadata.

I have a proxy workflow that should serve sub flows based on the method. So far I have implemented a X-Method header with the method wanted inside but it would be easier to just get the method from the webhook (which have been configured to receive any king of method).

I have dug through the forum but only found an unanswered one on this topic.

Cheers !

Information on your n8n setup

  • **n8n version:Last
  • **Database (default: SQLite):SQLite
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):own
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):Docker
  • **Operating system:Mac

Unfortunately there’s no way to officially do that. But here are 2 workarounds:

1. Use multiple webhooks with different names and get their names

2. Use a single webhook, and define the method by the output index

.

:muscle: If my reply solves your problem, please remember to mark it as a solution.

3 Likes

Hello mate,

Thank you for the solutions provided. That helps.
I haven’t thought about using outputIndex to be honest. That should do it although I had trouble with the multi method webhook.

Will try both,
Have a good day.

PS: sorry for taking this long to answer !

1 Like

Happy to help :muscle:
If you find other creative ways of doing this, let me know

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.