title: akka http - How to add json data to post request?
body: <p>I am querying a search api and I need to add the query params in json as body to a post request.</p>
  
  <pre><code>val headers: scala.collection.immutable.Seq[HttpHeader] = scala.collection.immutable.Seq(
    RawHeader("accept", "application/json"),
    RawHeader("authorization", "xxxxxxxxxxxxxxxxxxxx"),
    RawHeader("content-type", "application/json"),
    RawHeader("x-customer-id", "123456789")
  )
  
  val formData = FormData(Map(
        "Keywords" -&gt; "query", "Count" -&gt; "25"
      ))
  
  val request = HttpRequest(HttpMethods.POST, "https://api.xxx.com/services/xxx/v1/search?client_id=xxxxxx", headers, formData.toEntity)
  </code></pre>
  
  <p>Will using <code>formData.toEntity</code> send it as json in body of the post?</p>