-4
如何在動作/函數中查找當前URL?在文檔中我沒有發現與此相關的任何內容。如何在Iron中查找當前網址?
如何在動作/函數中查找當前URL?在文檔中我沒有發現與此相關的任何內容。如何在Iron中查找當前網址?
的Iron homepage有這樣的 「Hello World」 的例子:
fn hello_world(_: &mut Request) -> IronResult<Response> {
Ok(Response::with((status::Ok, "Hello World!")))
}
唯一的輸入功能是Request
。上結構的第一個字段是一個Url
:
url
:Url
請求的URL。