SmtpAccount
var client = new RestClient("https://api.messageflow.com/v2.1/email/smtpAccount");
var request = new RestRequest(Method.OPTIONS);
request.AddHeader("authorization", "REPLACE_KEY_VALUE");
IRestResponse response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.messageflow.com/v2.1/email/smtpAccount"
req, _ := http.NewRequest("OPTIONS", url, nil)
req.Header.Add("authorization", "REPLACE_KEY_VALUE")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.options("https://api.messageflow.com/v2.1/email/smtpAccount")
.header("authorization", "REPLACE_KEY_VALUE")
.asString();
var request = require("request");
var options = {
method: 'OPTIONS',
url: 'https://api.messageflow.com/v2.1/email/smtpAccount',
headers: {authorization: 'REPLACE_KEY_VALUE'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.messageflow.com/v2.1/email/smtpAccount",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "OPTIONS",
CURLOPT_HTTPHEADER => array(
"authorization: REPLACE_KEY_VALUE"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
import requests
url = "https://api.messageflow.com/v2.1/email/smtpAccount"
headers = {'authorization': 'REPLACE_KEY_VALUE'}
response = requests.request("OPTIONS", url, headers=headers)
print(response.text)
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.messageflow.com/v2.1/email/smtpAccount")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Options.new(url)
request["authorization"] = 'REPLACE_KEY_VALUE'
response = http.request(request)
puts response.read_body
http OPTIONS https://api.messageflow.com/v2.1/email/smtpAccount \
authorization:REPLACE_KEY_VALUEuthorization: REPLACE_KEY_VALUE'
Last updated