CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "https://2factor.in/API/V1/{api_key}/SMS/{phone_number}/{otp_code}");

CURLcode ret = curl_easy_perform(hnd);
var client = new RestClient("https://2factor.in/API/V1/{api_key}/SMS/{phone_number}/{otp_code}");
var request = new RestRequest(Method.POST);
IRestResponse response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://2factor.in/API/V1/{api_key}/SMS/{phone_number}/{otp_code}"

	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))

}
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://2factor.in/API/V1/{api_key}/SMS/{phone_number}/{otp_code}")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse<String> response = Unirest.post("https://2factor.in/API/V1/{api_key}/SMS/{phone_number}/{otp_code}")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://2factor.in/API/V1/{api_key}/SMS/{phone_number}/{otp_code}",
  "method": "POST",
  "headers": {}
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://2factor.in/API/V1/{api_key}/SMS/{phone_number}/{otp_code}");

xhr.send(data);
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "2factor.in",
  "port": null,
  "path": "/API/V1/{api_key}/SMS/{phone_number}/{otp_code}",
  "headers": {}
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
var request = require("request");

var options = { method: 'POST',
  url: 'https://2factor.in/API/V1/{api_key}/SMS/{phone_number}/{otp_code}' };

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

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

var req = unirest("POST", "https://2factor.in/API/V1/{api_key}/SMS/{phone_number}/{otp_code}");


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

  console.log(res.body);
});
#import <Foundation/Foundation.h>

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://2factor.in/API/V1/{api_key}/SMS/{phone_number}/{otp_code}"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];

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];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "https://2factor.in/API/V1/{api_key}/SMS/{phone_number}/{otp_code}" in

Client.call `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://2factor.in/API/V1/{api_key}/SMS/{phone_number}/{otp_code}",
  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;
}
<?php

$request = new HttpRequest();
$request->setUrl('https://2factor.in/API/V1/{api_key}/SMS/{phone_number}/{otp_code}');
$request->setMethod(HTTP_METH_POST);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://2factor.in/API/V1/{api_key}/SMS/{phone_number}/{otp_code}');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
import http.client

conn = http.client.HTTPSConnection("2factor.in")

conn.request("POST", "/API/V1/{api_key}/SMS/{phone_number}/{otp_code}")

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

print(data.decode("utf-8"))
import requests

url = "https://2factor.in/API/V1/{api_key}/SMS/{phone_number}/{otp_code}"

response = requests.request("POST", url)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://2factor.in/API/V1/{api_key}/SMS/{phone_number}/{otp_code}")

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
curl --request POST \
  --url https://2factor.in/API/V1/{api_key}/SMS/{phone_number}/{otp_code}
http POST https://2factor.in/API/V1/{api_key}/SMS/{phone_number}/{otp_code}
wget --quiet \
  --method POST \
  --output-document \
  - https://2factor.in/API/V1/{api_key}/SMS/{phone_number}/{otp_code}
import Foundation

var request = NSMutableURLRequest(URL: NSURL(string: "https://2factor.in/API/V1/{api_key}/SMS/{phone_number}/{otp_code}")!,
                                        cachePolicy: .UseProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.HTTPMethod = "POST"

let session = NSURLSession.sharedSession()
let dataTask = session.dataTaskWithRequest(request, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    println(error)
  } else {
    let httpResponse = response as? NSHTTPURLResponse
    println(httpResponse)
  }
})

dataTask.resume()