Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^8: How can i capture the site_id in Dancer 2 app?

by chandantul (Scribe)
on Jun 17, 2021 at 14:00 UTC ( [id://11133956]=note: print w/replies, xml ) Need Help??


in reply to Re^7: How can i capture the site_id in Dancer 2 app?
in thread How can i capture the site_id in Dancer 2 app?

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Re^8: How can i capture the site_id in Dancer 2 app?

Replies are listed 'Best First'.
Re^9: How can i capture the site_id in Dancer 2 app?
by 1nickt (Canon) on Jun 17, 2021 at 14:06 UTC

    site_id is not some magical value that appears inside your endpoint handler. You have defined your endpoint as accepting a param site_id to be represented in the endpoint URL as :site_id after the first slash. The caller of your endpoint supplies the value in the URL.

    In the example call you showed above you are not calling the endpoint with a route parameter that would occupy the place of the token you defined in the handler. Try it as I suggested earlier:

    https://testchandan.com:5001/42
    or
    https://testchandan.com:5001/HELLO


    The way forward always starts with a minimal test.
    A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11133956]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-19 03:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found