我正在使用 Azure Function 隔離的 .net 5 HttpTrigger。
當使用“#”而不是“?”傳遞引數時,如何使用 URL“引數”?
示例:https//some.sample.url/path#param1=someValue?m2=someOtherValue
我需要這些值:
param1=someValue;
param2=someOtherValue;
背景資料:
https://www.rfc-editor.org/rfc/rfc6749 @ 4.2.2。訪問令牌回應:
For example, the authorization server redirects the user-agent by
sending the following HTTP response (with extra line breaks for
display purposes only):
HTTP/1.1 302 Found
Location: http://example.com/cb#access_token=2YotnFZFEjr1zCsicMWpAA
&state=xyz&token_type=example&expires_in=3600
uj5u.com熱心網友回復:
不可以。在 azure 函式服務器端,您將無法訪問#請求 URL 中的任何內容。
URL 片段識別符號旨在供客戶端(用戶代理/瀏覽器)使用。它們用于導航到 HTML 檔案的特定子部分或其他客戶端用戶體驗增強。如果您嘗試 URLhttps://www.bing.com/#foo=test&bar=test2并觀察來自瀏覽器的網路流量,您可以看到片段識別符號 ( #)之后的任何內容都沒有發送到服務器。
如果您想訪問服務器端的一些附加資訊,請考慮將它們作為查詢字串發送。前任:https://www.bing.com?param1=someValue¶m2=someOtherValue
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/348537.html
下一篇:Java旋轉Polgon使其變形
