raw_request=0;
ql_httpc_setopt(&http_cli, HTTP_CLIENT_OPT_SIM_ID, nSim);
ql_httpc_setopt(&http_cli, HTTP_CLIENT_OPT_PDPCID, profile_idx);
ql_httpc_setopt(&http_cli, HTTP_CLIENT_OPT_URL, (char *)url);
ql_httpc_setopt(&http_cli, HTTP_CLIENT_OPT_WRITE_FUNC, http_write_response_data);
ql_httpc_setopt(&http_cli, HTTP_CLIENT_OPT_METHOD, HTTP_METHOD_POST);
ql_httpc_setopt(&http_cli, HTTP_CLIENT_OPT_RAW_REQUEST, &raw_request);
sprintf(write_header,“Content-Type: application/json\r\nContent-Length: %d\r\nHost: 128.235.125.51\r\nConnection: keep-alive\r\nAccept: /\r\n\r\n”,strlen(test_str));
ql_httpc_setopt(&http_cli, HTTP_CLIENT_OPT_REQUEST_HEADER, write_header);
ql_httpc_setopt(&http_cli, HTTP_CLIENT_OPT_WRITE_DATA, test_str);
if(ql_httpc_perform(&http_cli) == HTTP_SUCCESS)
{
QL_HTTP_LOG("http request sent");
ql_rtos_semaphore_wait(http_semp, QL_WAIT_FOREVER);
}
else
{
QL_HTTP_LOG("http request failed!!!!!!!!!!");
}