C# console program can change firewall rule description, however not the expression

I am trying to create a program, which can update a firewall rule and it should work. The issue is the expression.

It currently comes out like this

“(http.host eq "domain.name" and not ip.src in {})”

though with other ip addresses and an actual domain name.
The expression is incorrect, due to cloudflare not accepting the \ symbols, inside the string. At least thats my theory. as the title says, i can update the description of the firewall, without issues.
I cant figure out how i can write it differently. According to cloudflare, it should be like this:
(http.host eq “domain.name” and not ip.src in {})

Any suggestions?

this is my github, to the class that handles Cloudflare stuff.

The method that actually updates the firewall is called UpdateFirewallRule.

I Hope you guys can help me out, thanks :slight_smile:

well apparently cloudflare automatically converts how it looks, in the forum.
it looks like this then \ "domain.name\ " without the spaces from the quote symbols.

i changed the language to python and the expression is perfect.
I can literally copy the expression from the variable, if i put down a break point, and then put that in cloudflare and its accepted. I can still change the firewall rule name, from the same put request, but i cant update the rule expression, from my program.