[英]Ask - How to use the word 'params' in 'PostJsonAsync' Flurl
I am using flurl to retrieve data in the url.我正在使用flurl检索 url 中的数据。 How to use the word params in PostJsonAsync ?
如何在PostJsonAsync中使用params这个词? The problem I get is
identifier expected: 'params' is keyword
, if I use a word other than 'params' there is no problem.我得到的问题是
identifier expected: 'params' is keyword
,如果我使用 'params' 以外的词,则没有问题。
.PostJsonAsync(new
{
variables = (new
{
params = "&ob=23&identifier=handphone-tablet_aksesoris-handphone&sc=66&user_id=0&rows=60&start=1&source=directory&device=desktop&page=1&related=true&st=product&safe_search=false"
}),
})
Anytime you want to use a C# reserved word as a property name, just prefix it with @
:每当您想使用 C# 保留字作为属性名称时,只需在其前面加上
@
:
new
{
@params = "..."
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.