python equivalent to PHP Post
<p>I am working with legacy system the previous programer was gone.<br>
Here is the test he left and I have no idea how to imitate his test using <code>python</code>. My background is <code>iOS, Android, Java, Python, Django, C/C++, PLSQL, SQL</code> but no PHP at all</p>

<p>Here is <code>test.php</code></p>

<pre><code>var tHost = "10.1.10.123";
var tExiname = "CloudHM TEST123";
var tIncname = "INC012345";
var tHWname = "aa 1111 0";
var tHwattr = "all";
var tStatus = 0;
var tCteatedat = "2016-05-23 12:20:42";
var d = new Date,
tUpdateat = [d.getFullYear(),
             d.getMonth()+1,
             d.getDate()].join('-')+' '+
          [d.getHours(),
           d.getMinutes(),
           d.getSeconds()].join(':');
var arr =  [{ host: tHost, host_name: tExiname, component_type: tHWname, component_status: tStatus, incident_created: tUpdateat }];
var arr2 =JSON.stringify(arr)
$.ajax({
    url: 'http://customer.beenets.net/api/cloudhm/api.php' ,
    type: 'POST',
    data: { params: arr2 },
    success: function(msg) {
        //ShowOutput(msg);
        alert(JSON.stringify(arr, null, 4));
    }
})
</code></pre>

<p>I had tried this. Response is <code>200</code>, but <code>PHP server</code> read no payload</p>

<pre><code>notification_data = [{
            "host": i.host,
            "host_name": i.host_name,
            "incident_created": i.incident_created,
            "component_type": i.component_type,
            "component_status": i.component_status
        }]
        response = requests.post(NOC_BEENETS_URL, data=json.dumps(notification_data))
</code></pre>

<p>Then I try put <code>params</code> key in front of it</p>

<pre><code>notification_data = [{
    "params":{
        "host": i.host,
        "host_name": i.host_name,
        "incident_created": i.incident_created,
        "component_type": i.component_type,
        "component_status": i.component_status
    }
}]
response = requests.post(NOC_BEENETS_URL, data=json.dumps(notification_data))
</code></pre>

<p>Server return me 200 and read no payload again<br></p>

<p>Any help would be appreciated<br>
Best regards<br>
Sarit</p>

<p>Edited:</p>

<pre><code>notification_data = [{
        "host": i.host,
        "host_name": i.host_name,
        "incident_created": i.incident_created,
        "component_type": i.component_type,
        "component_status": i.component_status
    }]
r = requests.post(NOC_BEENETS_URL, data = {'params': json.dumps(notification_data)})
</code></pre>

php python