curl -X DELETE \
https://emailoctopus.com/api/1.6/lists/00000000-0000-0000-0000-000000000000?api_key=00000000-0000-0000-0000-000000000000
|
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://emailoctopus.com/api/1.6/lists/00000000-0000-0000-0000-000000000000?api_key=00000000-0000-0000-0000-000000000000');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close($ch);
|
import requests
params = (
('api_key', '00000000-0000-0000-0000-000000000000'),
)
response = requests.delete('https://emailoctopus.com/api/1.6/lists/00000000-0000-0000-0000-000000000000', params=params)
|
var https = require('https');
var options = {
hostname: 'emailoctopus.com',
port: 443,
path: '/api/1.6/lists/00000000-0000-0000-0000-000000000000?api_key=00000000-0000-0000-0000-000000000000',
method: 'DELETE',
};
var req = https.request(options);
req.end();
|
package main
import (
"io/ioutil"
"log"
"net/http"
)
func main() {
client := &http.Client{}
req, err := http.NewRequest("DELETE", "https://emailoctopus.com/api/1.6/lists/00000000-0000-0000-0000-000000000000?api_key=00000000-0000-0000-0000-000000000000", nil)
if err != nil {
log.Fatal(err)
}
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
bodyText, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
}
|