dashborg / hibiki

Hibiki HTML
https://www.hibikihtml.com/
Mozilla Public License 2.0
468 stars 6 forks source link

How to use remote handler when i need to encode parameters in url? #9

Closed Bidaya0 closed 2 years ago

Bidaya0 commented 2 years ago

like this:

/api/v1/user/<int:id>

How do I add parameters correctly, there is no such example in the playground.

sawka commented 2 years ago

Hi, you can make a call to a dynamic URL by using the "callhandler" statement: $.result = callhandler(@url="/api/v1/user/" + $.id, @method="GET") The method will default to "GET" so it can be omitted. All the non-@ params will be converted to URL parameters on the actual call.

There is some additional documentation here: https://docs.hibikihtml.com/reference/http-module/

Bidaya0 commented 2 years ago

Hi, you can make a call to a dynamic URL by using the "callhandler" statement: $.result = callhandler(@url="/api/v1/user/" + $.id, @method="GET") The method will default to "GET" so it can be omitted. All the non-@ params will be converted to URL parameters on the actual call.

There is some additional documentation here: https://docs.hibikihtml.com/reference/http-module/

Thank you for quick reply.