HttpProcessor URL parameters

33 views
Skip to first unread message

Andre Correa

unread,
Jan 21, 2022, 5:16:09 PM1/21/22
to Fusio
Hi,

I've created a HttpProcessor action that should receive a parameter via the API and pass it to the HTTP address it requests. To make sure I'm clear, let me explain.

- a route was defined as '/domain/ranking/:domain' and its associated action requests the address http://some.address.com/test/{domain}

- the API receives requests like:

/domain/ranking/google.com
/domain/ranking/yahoo.com
/domain/ranking/groups.google.com

Those are routed to my HttpProcessor action which should make HTTP requests like this:


Notice that 'google.com' received via the API should be added to the HTTP request of the action.

It happens that {domain} is not expanded to contain 'google.com', therefore the URL requested is always http://some.address.com/test/{domain}

Reading the source code I couldn't figure out what I am missing.  Would appreciate any help you may be able to provide.

Thank you!

Christoph Kappestein

unread,
Jan 23, 2022, 2:16:54 PM1/23/22
to Fusio
Hi Andre,

sure, so in your case the url should be simply http://some.address.com/test/:domain so use the colon syntax instead of the curly brackets, then it should work as expected.

best regards
Christoph
Reply all
Reply to author
Forward
0 new messages