Copy to Clipboard curl --request POST \
--url 'https://cloudapiintegration.com/api/send?number=919876543210&type=text&message=test+message&instance_id=609ACFbbbXXXX&access_token=EnterYourAccessToken'
Copy to Clipboard http POST 'https://cloudapiintegration.com/api/send?number=919876543210&type=text&message=test+message&instance_id=609ACFbbbXXXX&access_token=EnterYourAccessToken'
Copy to Clipboard var unirest = require ("unirest" );
var req = unirest("POST" , "https://cloudapiintegration.com/api/send.php" );
req.query({
"access_token" : "EnterYourAccessToken" ,
"instance_id" : "609ACFbbbXXXX" ,
"number" : "919876543210" ,
"message" : "Hello World" ,
"type" : "text"
});
req.end(function (res) {
if (res.error) throw new Error (res.error);
console .log(res.body);
});
Copy to Clipboard var request = require ("request" );
var options = {
method: 'POST' ,
url: 'https://cloudapiintegration.com/api/send.php' ,
qs: {
access_token: 'EnterYourAccessToken' ,
instance_id: '609ACFbbbXXXX' ,
number: '919876543210' ,
message: 'Hello World' ,
type: 'text'
}
};
request(options, function (error, response, body) {
if (error) throw new Error (error);
console .log(body);
});
Copy to Clipboard fetch("https://cloudapiintegration.com/api/send?number=919876543210&type=text&message=test+message&instance_id=609ACFbbbXXXX&access_token=EnterYourAccessToken" , {
"method" : "POST" ,
"headers" : {}
})
.then(response => {
console .log(response);
})
.catch(err => {
console .log(err);
});
Copy to Clipboard var settings = {
"async" : true ,
"crossDomain" : true ,
"url" : "https://cloudapiintegration.com/api/send?number=919876543210&type=text&message=test+message&instance_id=609ACFbbbXXXX&access_token=EnterYourAccessToken" ,
"method" : "POST" ,
"headers" : {}
}
$.ajax(settings).done(function (response) {
console .log(response);
});
Copy to Clipboard HttpResponse<String> response = Unirest.post("https://cloudapiintegration.com/api/send?number=919876543210&type=text&message=test+message&instance_id=609ACFbbbXXXX&access_token=EnterYourAccessToken" )
.asString();
Copy to Clipboard OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://cloudapiintegration.com/api/send?number=919876543210&type=text&message=test+message&instance_id=609ACFbbbXXXX&access_token=EnterYourAccessToken" )
.post(null )
.build();
Response response = client.newCall(request).execute();
Copy to Clipboard import requests
url = "https://cloudapiintegration.com/api/send.php"
querystring = {"access_token" :"EnterYourAccessToken" ,"instance_id" :"609ACFbbbXXXX" ,"number" :"919876543210" ,"message" :"Hello World" ,"type" :"text" }
response = requests.request("POST" , url, params=querystring)
print(response.text)
Copy to Clipboard <?php
$curl = curl_init();
curl_setopt_array($curl , array (
CURLOPT_URL => "https://cloudapiintegration.com/api/send?number=919876543210&type=text&message=test+message&instance_id=609ACFbbbXXXX&access_token=EnterYourAccessToken" ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST" ,
));
$response = curl_exec($curl );
$err = curl_error($curl );
curl_close($curl );
if ($err ) {
echo "cURL Error #:" . $err ;
} else {
echo $response ;
}
Copy to Clipboard <?php
$client = new http\Client;
$request = new http\Client\Request;
$request ->setRequestUrl('https://cloudapiintegration.com/api/send.php' );
$request ->setRequestMethod('POST' );
$request ->setQuery(new http\QueryString(array (
'access_token' => 'EnterYourAccessToken' ,
'instance_id' => '609ACFbbbXXXX' ,
'number' => '919876543210' ,
'message' => 'Hello World' ,
'type' => 'text'
)));
$client ->enqueue($request )->send();
$response = $client ->getResponse();
echo $response ->getBody();
Copy to Clipboard require 'uri'
require 'net/http'
require 'openssl'
url = URI ("https://cloudapiintegration.com/api/send?number=919876543210&type=text&message=test+message&instance_id=609ACFbbbXXXX&access_token=EnterYourAccessToken" )
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)
response = http.request(request)
puts response.read_body
Copy to Clipboard package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://cloudapiintegration.com/api/send?number=919876543210&type=text&message=test+message&instance_id=609ACFbbbXXXX&access_token=EnterYourAccessToken"
req, _ := http.NewRequest ("POST" , url, nil)
res, _ := http.DefaultClient .Do (req)
defer res.Body .Close ()
body, _ := ioutil.ReadAll (res.Body )
fmt.Println (res)
fmt.Println (string (body))
}
Copy to Clipboard var client = new RestClient("https://cloudapiintegration.com/api/send?number=919876543210&type=text&message=test+message&instance_id=609ACFbbbXXXX&access_token=EnterYourAccessToken" );
var request = new RestRequest(Method.POST);
IRestResponse response = client.Execute(request);
Copy to Clipboard import Foundation
let request = NSMutableURLRequest (url: NSURL (string : "https://cloudapiintegration.com/api/send?number=919876543210&type=text&message=test+message&instance_id=609ACFbbbXXXX&access_token=EnterYourAccessToken" )! as URL ,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0 )
request.httpMethod = "POST"
let session = URLSession .shared
let dataTask = session.dataTask(with : request as URLRequest , completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as ? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
Copy to Clipboard CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST" );
curl_easy_setopt(hnd, CURLOPT_URL, "https://cloudapiintegration.com/api/send?number=919876543210&type=text&message=test+message&instance_id=609ACFbbbXXXX&access_token=EnterYourAccessToken" );
CURLcode ret = curl_easy_perform(hnd);
Copy to Clipboard (require '[clj-http.client :as client])
(client/post "https://cloudapiintegration.com/api/send.php" {:query-params {:access_token "EnterYourAccessToken"
:instance_id "609ACFbbbXXXX"
:number "919876543210"
:message "Hello World"
:type "text"}})
Copy to Clipboard $response = Invoke-RestMethod -Uri 'https://cloudapiintegration.com/api/send?number=919876543210&type=text&message=test+message&instance_id=609ACFbbbXXXX&access_token=EnterYourAccessToken' -Method POST
Copy to Clipboard open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri .of_string "https://cloudapiintegration.com/api/send?number=919876543210&type=text&message=test+message&instance_id=609ACFbbbXXXX&access_token=EnterYourAccessToken" in
Client .call `POST uri
>>= fun (res, body_stream) ->