title: C++ sending forming and sending JSON structures and posting with CurlLib
body: <p>This works when its just a standard string with &quot;content=blahblah&quot;</p>
  <p>So I have my JSON structure</p>
  <pre><code>{
    &quot;content&quot;: null,
    &quot;embeds&quot;: [
      {
        &quot;title&quot;: &quot;Login&quot;,
        &quot;description&quot;: &quot;Key = null&quot;,
        &quot;color&quot;: null
      }
    ]
  }
  </code></pre>
  <p>and I think I have put It into C++ JSON correctly</p>
  <pre><code>json data;
      data = R&quot;(
          {
    &quot;content&quot;: null,
    &quot;embeds&quot;: [
      {
        &quot;title&quot;: &quot;Login&quot;,
        &quot;description&quot;: &quot;Key = null&quot;,
        &quot;color&quot;: null
      }
    ]
  }
      )&quot;_json;
  
  </code></pre>
  <p>I have my curl code but this is throwing an exception.</p>
  <pre><code>if (curl) {
          //Set URL that will be posted to
          curl_easy_setopt(curl, CURLOPT_URL, webhookURL);
          curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
          //Set post data
          curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data.dump().data());
          //Get result
          res = curl_easy_perform(curl);
          if (res != CURLE_OK) {
              std::cout &lt;&lt; curl_easy_strerror(res) &lt;&lt; std::endl;
              curl_easy_cleanup(curl);
          }
      }
      curl_global_cleanup();
  </code></pre>
  <p>ive changed the cpp json again but instead i get a different exception
  The exception:</p>
  <pre><code>{&quot;message&quot;: &quot;Cannot send an empty message&quot;, &quot;code&quot;: 50006}
  </code></pre>
  <p>Please help, Thanks</p>