Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
プログラムでルートにアクセスする方法はありますか(http経由で呼び出すことなく)。
例:(defroutes main-routes(POST "/ query" "OK ..."))
defroutesマクロが生成した「クエリ」関数を呼び出すことはできますか?
defroutes渡したのと同じ名前のリングハンドラーを作成します。つまり、基本的にリングハンドラー、つまり要求マップを受け取り、応答マップを返す単純な関数があります。
defroutes
あなたの場合、「/ query」ハンドラー関数に渡されるようなキーmain-routesを持つ適切なリングリクエストマップオブジェクトを渡すことで、関数を呼び出すことができます。uri
main-routes
uri