title: How to post json in lua using cURL
body: <p>I'm trying to post json in Lua using cURL. I can't find any example online.</p>
  
  <p>Something like this:</p>
  
  <pre><code>    c = curl.easy{
    url      = "http://posttestserver.com/post.php",
    -- url      = "http://httpbin.org/post",
    post     = true,
    httppost = curl.form{
  
        data = "{}",
        type = "application/json",
  
    },
  }
  t = {}
   c:perform{
          writefunction = function(s)
              t[#t+1] = s
          end
      }
  
  c:close()
  </code></pre>