curl -X GET "https://api.netinternet.com.tr/v2/servers" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
import requests
url = "https://api.netinternet.com.tr/v2/servers"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
data = response.json()
print(data)
const response = await fetch('https://api.netinternet.com.tr/v2/servers', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.netinternet.com.tr/v2/servers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer YOUR_API_KEY",
"Content-Type: application/json"
]
]);
$response = curl_exec($curl);
$data = json_decode($response, true);
curl_close($curl);
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://api.netinternet.com.tr/v2/servers", nil)
req.Header.Add("Authorization", "Bearer YOUR_API_KEY")
req.Header.Add("Content-Type", "application/json")
resp, _ := client.Do(req)
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}