$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://185.112.33.62/api/v1/rest/sms/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{"from": "","recipients":"","message":"","type":0}",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"password: ",
"username: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
var client = new RestClient("http://185.112.33.62/api/v1/rest/sms/send");
var request = new RestRequest(Method.POST);
request.AddHeader("username", "");
request.AddHeader("password", "");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json","
{
"from":"",
"recipients":"",
"message":"",
"type": 0
}
", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse response = Unirest.post("http://185.112.33.62/api/v1/rest/sms/send")
.header("username", "")
.header("password", "")
.header("Content-Type", "application/json")
.body("
{
"from":"",
"recipients":"",
"message":"",
"type": 0
}
")
.asString();
import http.client
conn = http.client.HTTPConnection("185.112.33.62")
payload = "
{
"from":"",
"recipients":"",
"message":"",
"type": 0
}"
headers = {
'username': "",
'password': "",
'Content-Type': "application/json"
}
conn.request("POST", "/api/v1/rest/sms/send", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("http");
const options = {
"method": "POST",
"hostname": "185.112.33.62",
"port": null,
"path": "/api/v1/rest/sms/send",
"headers": {
"username": "",
"password": "",
"Content-Type": "application/json",
"Content-Length": "90"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({from: '', recipients: [''], message: '', type: 0}));
req.end();
با ما در ارتباط باشید
مشتریانی که به ما اعتماد کردند