[英]how to add Path Parameter on http client c#
您可以使用字符串插值和連接。 我認為這就是您所要求的;
int userId = 1;
string url = $"https://testurl/accounts/product/:productid/user/{userId}";
// Add here if there is any condtion if() or any loop
url += "?fields=Attributes";
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.