title: How to pass { or " in query parameters to HttpClient in C# for Autotask?
body: <p>I'm trying to query tickets in Autotask but their requirement is to send query as an object like: <code>query?search={&quot;filter&quot;:[{&quot;op&quot;:&quot;eq&quot;,&quot;field&quot;:&quot;CompanyID&quot;,&quot;value&quot;:&quot;1234&quot;},{&quot;op&quot;:&quot;gte&quot;,&quot;field&quot;:&quot;LastActivityDate&quot;,&quot;value&quot;:&quot;11/21/2021&quot;}]}</code></p>
  <p>So what I tried is making a type like their query objects and serializing it before passing it as parameter. like:</p>
  <pre><code>var json = JsonConvert.SerializeObject(new Params
              {
                  filter = new List&lt;Filter&gt;
                  {
                      new Filter { op = &quot;eq&quot;, field = &quot;CompanyID&quot;, value = AccountID },
                      new Filter { op = &quot;gte&quot;, field = &quot;LastActivityDate&quot;, value = LMT },
                  },
              });
  var response = httpClient.GetAsync($&quot;/tickets/query?search={json}&quot;).Result;
  </code></pre>
  <p>But I'm getting response as 404, and reason is because httpClient is converting the query in the url as:</p>
  <pre><code>/query?search={&quot;filter%22:[%7B%22op%22:%22eq%22,%22field%22:%22CompanyID%22,%22value%22:%221234567%22%7D,%7B%22op%22:%22gte%22,%22field%22:%22LastActivityDate%22,%22value%22:%2211/21/2021%22%7D]%7D
  </code></pre>
  <p>Its converting curly brackets &quot;{&quot; to %7B.</p>
  <p>So what's the proper way of sending these kind of complex objects as query parameters in C#?</p>