1

I am using flurl to retrieve data in the url. How to use the word params in PostJsonAsync? The problem I get is identifier expected: 'params' is keyword, if I use a word other than 'params' there is no problem.

            .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"
                }),
            })
Hulk
  • 6,399
  • 1
  • 30
  • 52
Kolimondi
  • 87
  • 1
  • 5

1 Answers1

1

Anytime you want to use a C# reserved word as a property name, just prefix it with @:

new 
{
    @params = "..."
}
Todd Menier
  • 37,557
  • 17
  • 150
  • 173