<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://hiwhats.com/API/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 => "{\"mobile\": \"1234567890\",\"password\": \"*********\",\"instanceid\": \"98765\",\"numbers\": \"987654321\",\"type\": \"1\",\"message\": \"Hello world! This is a test message\",\"json\": \"1\",}",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
<?php

$request = new HttpRequest();
$request->setUrl('https://hiwhats.com/API/send');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'accept' => 'application/json',
  'content-type' => 'application/json'
));

$request->setBody('{"mobile": "1234567890","password": "*********","instanceid": "98765","numbers": "987654321","type": "1","message": "Hello world! This is a test message","json": "1",}');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
var client = new RestClient("https://hiwhats.com/API/send");
var request = new RestRequest(Method.POST);
request.AddHeader("accept", "application/json");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"mobile\": \"1234567890\",\"password\": \"*********\",\"instanceid\": \"98765\",\"numbers\": \"987654321\",\"type\": \"1\",\"message\": \"Hello world! This is a test message\",\"json\": \"1\",}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
var unirest = require("unirest");

var req = unirest("POST", "https://hiwhats.com/API/send");

req.headers({
  "accept": "application/json",
  "content-type": "application/json"
});

  req.send("{\"mobile\": \"1234567890\",\"password\": \"*********\",\"instanceid\": \"98765\",\"numbers\": \"987654321\",\"type\": \"1\",\"message\": \"Hello world! This is a test message\",\"json\": \"1\",}");

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
var request = require("request");

var options = {
  method: 'POST',
  url: 'https://hiwhats.com/API/send',
  headers: {accept: 'application/json', 'content-type': 'application/json'},
  body: '{"mobile": "1234567890","password": "*********","instanceid": "98765","numbers": "987654321","type": "1","message": "Hello world! This is a test message","json": "1",}'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
HttpResponse<String> response = Unirest.post("https://hiwhats.com/API/send")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .body("{\"mobile\": \"1234567890\",\"password\": \"*********\",\"instanceid\": \"98765\",\"numbers\": \"987654321\",\"type\": \"1\",\"message\": \"Hello world! This is a test message\",\"json\": \"1\",}")
  .asString();
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "{\"mobile\": \"1234567890\",\"password\": \"*********\",\"instanceid\": \"98765\",\"numbers\": \"987654321\",\"type\": \"1\",\"message\": \"Hello world! This is a test message\",\"json\": \"1\",}");
Request request = new Request.Builder()
  .url("https://hiwhats.com/API/send")
  .post(body)
  .addHeader("accept", "application/json")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
#import <Foundation/Foundation.h>

NSDictionary *headers = @{ @"accept": @"application/json",
                           @"content-type": @"application/json" };

NSData *postData = [[NSData alloc] initWithData:[@"{"mobile": "1234567890","password": "*********","instanceid": "98765","numbers": "987654321","type": "1","message": "Hello world! This is a test message","json": "1",}" dataUsingEncoding:NSUTF8StringEncoding]];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://hiwhats.com/API/send"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
curl --request POST \
  --url https://hiwhats.com/API/send \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{"mobile": "1234567890","password": "*********","instanceid": "98765","numbers": "987654321","type": "1","message": "Hello world! This is a test message","json": "1",}'
import requests

url = "https://hiwhats.com/API/send"

payload = "{\"mobile\": \"1234567890\",\"password\": \"*********\",\"instanceid\": \"98765\",\"numbers\": \"987654321\",\"type\": \"1\",\"message\": \"Hello world! This is a test message\",\"json\": \"1\",}"
headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
import http.client

conn = http.client.HTTPSConnection("hiwhats.com")

payload = "{\"mobile\": \"1234567890\",\"password\": \"*********\",\"instanceid\": \"98765\",\"numbers\": \"987654321\",\"type\": \"1\",\"message\": \"Hello world! This is a test message\",\"json\": \"1\",}"

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("POST", "/API/send", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://hiwhats.com/API/send")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request.body = "{\"mobile\": \"1234567890\",\"password\": \"*********\",\"instanceid\": \"98765\",\"numbers\": \"987654321\",\"type\": \"1\",\"message\": \"Hello world! This is a test message\",\"json\": \"1\",}"

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://hiwhats.com/API/send",
  "method": "POST",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  },
  "data": "{\"mobile\": \"1234567890\",\"password\": \"*********\",\"instanceid\": \"98765\",\"numbers\": \"987654321\",\"type\": \"1\",\"message\": \"Hello world! This is a test message\",\"json\": \"1\",}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
fetch("https://hiwhats.com/API/send", {
  "method": "POST",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  },
  "body": "{\"mobile\": \"1234567890\",\"password\": \"*********\",\"instanceid\": \"98765\",\"numbers\": \"987654321\",\"type\": \"1\",\"message\": \"Hello world! This is a test message\",\"json\": \"1\",}"
})
.then(response => {
  console.log(response);
})
.catch(err => {
  console.log(err);
});