【发布时间】:2021-12-05 02:41:18
【问题描述】:
我有一个 URL,我试图将其作为查询字符串传递给控制器。但是当我这样做时,我只得到一半的 URL。 但是,console.log 会打印整个 URL。
export async function sendNotification(PlanId: string, URL: string) {
console.log("Service URL : - ", URL);
let url = HttpClient.buildUrl(`api/smsNotification/${PlanId}?URL=${URL}`);
return await HttpClient.get(url);
}
[HttpGet("Notification/{PlanId}")]
[ValidateModelState]
public async Task<IActionResult> SendNotification(Guid PlanId, string URL)
{
return NoContent();
}
https://chats.landbot.io/v3/index.html?name=Sys+Admin&planid=a7f8&environment=dev&stack=dev
但在控制器,我得到了这个 URL
https://chats.landbot.io/v3/index.html?name=Sys Admin
【问题讨论】:
标签: javascript asp.net-mvc asp.net-core .net-core