Cloud-RF API
GET
Find the best server for overlapping coverage
{{baseUrl}}/interference
HEADERS
key
{{apiKey}}
QUERY PARAMS
network
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/interference?network=&name=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "key: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/interference" {:headers {:key "{{apiKey}}"}
:query-params {:network ""
:name ""}})
require "http/client"
url = "{{baseUrl}}/interference?network=&name="
headers = HTTP::Headers{
"key" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/interference?network=&name="),
Headers =
{
{ "key", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/interference?network=&name=");
var request = new RestRequest("", Method.Get);
request.AddHeader("key", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/interference?network=&name="
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("key", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/interference?network=&name= HTTP/1.1
Key: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/interference?network=&name=")
.setHeader("key", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/interference?network=&name="))
.header("key", "{{apiKey}}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/interference?network=&name=")
.get()
.addHeader("key", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/interference?network=&name=")
.header("key", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/interference?network=&name=');
xhr.setRequestHeader('key', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/interference',
params: {network: '', name: ''},
headers: {key: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/interference?network=&name=';
const options = {method: 'GET', headers: {key: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/interference?network=&name=',
method: 'GET',
headers: {
key: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/interference?network=&name=")
.get()
.addHeader("key", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/interference?network=&name=',
headers: {
key: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/interference',
qs: {network: '', name: ''},
headers: {key: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/interference');
req.query({
network: '',
name: ''
});
req.headers({
key: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/interference',
params: {network: '', name: ''},
headers: {key: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/interference?network=&name=';
const options = {method: 'GET', headers: {key: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"key": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/interference?network=&name="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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 "{{baseUrl}}/interference?network=&name=" in
let headers = Header.add (Header.init ()) "key" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/interference?network=&name=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"key: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/interference?network=&name=', [
'headers' => [
'key' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/interference');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'network' => '',
'name' => ''
]);
$request->setHeaders([
'key' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/interference');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'network' => '',
'name' => ''
]));
$request->setHeaders([
'key' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("key", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/interference?network=&name=' -Method GET -Headers $headers
$headers=@{}
$headers.Add("key", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/interference?network=&name=' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'key': "{{apiKey}}" }
conn.request("GET", "/baseUrl/interference?network=&name=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/interference"
querystring = {"network":"","name":""}
headers = {"key": "{{apiKey}}"}
response = requests.get(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/interference"
queryString <- list(
network = "",
name = ""
)
response <- VERB("GET", url, query = queryString, add_headers('key' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/interference?network=&name=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["key"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/interference') do |req|
req.headers['key'] = '{{apiKey}}'
req.params['network'] = ''
req.params['name'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/interference";
let querystring = [
("network", ""),
("name", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("key", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/interference?network=&name=' \
--header 'key: {{apiKey}}'
http GET '{{baseUrl}}/interference?network=&name=' \
key:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'key: {{apiKey}}' \
--output-document \
- '{{baseUrl}}/interference?network=&name='
import Foundation
let headers = ["key": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/interference?network=&name=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Find the best server for somewhere
{{baseUrl}}/network
HEADERS
key
{{apiKey}}
QUERY PARAMS
net
nam
lat
lon
alt
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/network?net=&nam=&lat=&lon=&alt=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "key: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/network" {:headers {:key "{{apiKey}}"}
:query-params {:net ""
:nam ""
:lat ""
:lon ""
:alt ""}})
require "http/client"
url = "{{baseUrl}}/network?net=&nam=&lat=&lon=&alt="
headers = HTTP::Headers{
"key" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/network?net=&nam=&lat=&lon=&alt="),
Headers =
{
{ "key", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/network?net=&nam=&lat=&lon=&alt=");
var request = new RestRequest("", Method.Get);
request.AddHeader("key", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/network?net=&nam=&lat=&lon=&alt="
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("key", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/network?net=&nam=&lat=&lon=&alt= HTTP/1.1
Key: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/network?net=&nam=&lat=&lon=&alt=")
.setHeader("key", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/network?net=&nam=&lat=&lon=&alt="))
.header("key", "{{apiKey}}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/network?net=&nam=&lat=&lon=&alt=")
.get()
.addHeader("key", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/network?net=&nam=&lat=&lon=&alt=")
.header("key", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/network?net=&nam=&lat=&lon=&alt=');
xhr.setRequestHeader('key', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/network',
params: {net: '', nam: '', lat: '', lon: '', alt: ''},
headers: {key: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/network?net=&nam=&lat=&lon=&alt=';
const options = {method: 'GET', headers: {key: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/network?net=&nam=&lat=&lon=&alt=',
method: 'GET',
headers: {
key: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/network?net=&nam=&lat=&lon=&alt=")
.get()
.addHeader("key", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/network?net=&nam=&lat=&lon=&alt=',
headers: {
key: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/network',
qs: {net: '', nam: '', lat: '', lon: '', alt: ''},
headers: {key: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/network');
req.query({
net: '',
nam: '',
lat: '',
lon: '',
alt: ''
});
req.headers({
key: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/network',
params: {net: '', nam: '', lat: '', lon: '', alt: ''},
headers: {key: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/network?net=&nam=&lat=&lon=&alt=';
const options = {method: 'GET', headers: {key: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"key": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/network?net=&nam=&lat=&lon=&alt="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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 "{{baseUrl}}/network?net=&nam=&lat=&lon=&alt=" in
let headers = Header.add (Header.init ()) "key" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/network?net=&nam=&lat=&lon=&alt=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"key: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/network?net=&nam=&lat=&lon=&alt=', [
'headers' => [
'key' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/network');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'net' => '',
'nam' => '',
'lat' => '',
'lon' => '',
'alt' => ''
]);
$request->setHeaders([
'key' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/network');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'net' => '',
'nam' => '',
'lat' => '',
'lon' => '',
'alt' => ''
]));
$request->setHeaders([
'key' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("key", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/network?net=&nam=&lat=&lon=&alt=' -Method GET -Headers $headers
$headers=@{}
$headers.Add("key", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/network?net=&nam=&lat=&lon=&alt=' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'key': "{{apiKey}}" }
conn.request("GET", "/baseUrl/network?net=&nam=&lat=&lon=&alt=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/network"
querystring = {"net":"","nam":"","lat":"","lon":"","alt":""}
headers = {"key": "{{apiKey}}"}
response = requests.get(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/network"
queryString <- list(
net = "",
nam = "",
lat = "",
lon = "",
alt = ""
)
response <- VERB("GET", url, query = queryString, add_headers('key' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/network?net=&nam=&lat=&lon=&alt=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["key"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/network') do |req|
req.headers['key'] = '{{apiKey}}'
req.params['net'] = ''
req.params['nam'] = ''
req.params['lat'] = ''
req.params['lon'] = ''
req.params['alt'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/network";
let querystring = [
("net", ""),
("nam", ""),
("lat", ""),
("lon", ""),
("alt", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("key", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/network?net=&nam=&lat=&lon=&alt=' \
--header 'key: {{apiKey}}'
http GET '{{baseUrl}}/network?net=&nam=&lat=&lon=&alt=' \
key:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'key: {{apiKey}}' \
--output-document \
- '{{baseUrl}}/network?net=&nam=&lat=&lon=&alt='
import Foundation
let headers = ["key": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/network?net=&nam=&lat=&lon=&alt=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Merge sites into a super layer.
{{baseUrl}}/mesh
HEADERS
key
{{apiKey}}
QUERY PARAMS
network
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/mesh?network=&name=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "key: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/mesh" {:headers {:key "{{apiKey}}"}
:query-params {:network ""
:name ""}})
require "http/client"
url = "{{baseUrl}}/mesh?network=&name="
headers = HTTP::Headers{
"key" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/mesh?network=&name="),
Headers =
{
{ "key", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/mesh?network=&name=");
var request = new RestRequest("", Method.Get);
request.AddHeader("key", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/mesh?network=&name="
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("key", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/mesh?network=&name= HTTP/1.1
Key: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/mesh?network=&name=")
.setHeader("key", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/mesh?network=&name="))
.header("key", "{{apiKey}}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/mesh?network=&name=")
.get()
.addHeader("key", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/mesh?network=&name=")
.header("key", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/mesh?network=&name=');
xhr.setRequestHeader('key', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/mesh',
params: {network: '', name: ''},
headers: {key: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/mesh?network=&name=';
const options = {method: 'GET', headers: {key: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/mesh?network=&name=',
method: 'GET',
headers: {
key: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/mesh?network=&name=")
.get()
.addHeader("key", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/mesh?network=&name=',
headers: {
key: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/mesh',
qs: {network: '', name: ''},
headers: {key: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/mesh');
req.query({
network: '',
name: ''
});
req.headers({
key: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/mesh',
params: {network: '', name: ''},
headers: {key: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/mesh?network=&name=';
const options = {method: 'GET', headers: {key: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"key": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/mesh?network=&name="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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 "{{baseUrl}}/mesh?network=&name=" in
let headers = Header.add (Header.init ()) "key" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/mesh?network=&name=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"key: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/mesh?network=&name=', [
'headers' => [
'key' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/mesh');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'network' => '',
'name' => ''
]);
$request->setHeaders([
'key' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/mesh');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'network' => '',
'name' => ''
]));
$request->setHeaders([
'key' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("key", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/mesh?network=&name=' -Method GET -Headers $headers
$headers=@{}
$headers.Add("key", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/mesh?network=&name=' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'key': "{{apiKey}}" }
conn.request("GET", "/baseUrl/mesh?network=&name=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/mesh"
querystring = {"network":"","name":""}
headers = {"key": "{{apiKey}}"}
response = requests.get(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/mesh"
queryString <- list(
network = "",
name = ""
)
response <- VERB("GET", url, query = queryString, add_headers('key' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/mesh?network=&name=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["key"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/mesh') do |req|
req.headers['key'] = '{{apiKey}}'
req.params['network'] = ''
req.params['name'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/mesh";
let querystring = [
("network", ""),
("name", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("key", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/mesh?network=&name=' \
--header 'key: {{apiKey}}'
http GET '{{baseUrl}}/mesh?network=&name=' \
key:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'key: {{apiKey}}' \
--output-document \
- '{{baseUrl}}/mesh?network=&name='
import Foundation
let headers = ["key": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/mesh?network=&name=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Create a point-to-multipoint heatmap
{{baseUrl}}/area
HEADERS
key
{{apiKey}}
BODY json
{
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/area");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "key: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/area" {:headers {:key "{{apiKey}}"}
:content-type :json
:form-params {:antenna {:ant 0
:azi 0
:hbw 0
:pol ""
:tlt ""
:txg ""
:txl ""
:vbw 0}
:environment {:cll 0
:clm 0
:mat ""}
:model {:cli 0
:ked 0
:pe 0
:pm 0
:rel 0
:ter 0}
:network ""
:output {:ber 0
:col ""
:mod 0
:nf 0
:out 0
:rad ""
:res 0
:units ""}
:receiver {:alt ""
:lat ""
:lon ""
:rxg ""
:rxs ""}
:site ""
:transmitter {:alt ""
:bwi ""
:frq ""
:lat ""
:lon ""
:txw ""}}})
require "http/client"
url = "{{baseUrl}}/area"
headers = HTTP::Headers{
"key" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/area"),
Headers =
{
{ "key", "{{apiKey}}" },
},
Content = new StringContent("{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/area");
var request = new RestRequest("", Method.Post);
request.AddHeader("key", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/area"
payload := strings.NewReader("{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("key", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/area HTTP/1.1
Key: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 675
{
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/area")
.setHeader("key", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/area"))
.header("key", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/area")
.post(body)
.addHeader("key", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/area")
.header("key", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
antenna: {
ant: 0,
azi: 0,
hbw: 0,
pol: '',
tlt: '',
txg: '',
txl: '',
vbw: 0
},
environment: {
cll: 0,
clm: 0,
mat: ''
},
model: {
cli: 0,
ked: 0,
pe: 0,
pm: 0,
rel: 0,
ter: 0
},
network: '',
output: {
ber: 0,
col: '',
mod: 0,
nf: 0,
out: 0,
rad: '',
res: 0,
units: ''
},
receiver: {
alt: '',
lat: '',
lon: '',
rxg: '',
rxs: ''
},
site: '',
transmitter: {
alt: '',
bwi: '',
frq: '',
lat: '',
lon: '',
txw: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/area');
xhr.setRequestHeader('key', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/area',
headers: {key: '{{apiKey}}', 'content-type': 'application/json'},
data: {
antenna: {ant: 0, azi: 0, hbw: 0, pol: '', tlt: '', txg: '', txl: '', vbw: 0},
environment: {cll: 0, clm: 0, mat: ''},
model: {cli: 0, ked: 0, pe: 0, pm: 0, rel: 0, ter: 0},
network: '',
output: {ber: 0, col: '', mod: 0, nf: 0, out: 0, rad: '', res: 0, units: ''},
receiver: {alt: '', lat: '', lon: '', rxg: '', rxs: ''},
site: '',
transmitter: {alt: '', bwi: '', frq: '', lat: '', lon: '', txw: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/area';
const options = {
method: 'POST',
headers: {key: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"antenna":{"ant":0,"azi":0,"hbw":0,"pol":"","tlt":"","txg":"","txl":"","vbw":0},"environment":{"cll":0,"clm":0,"mat":""},"model":{"cli":0,"ked":0,"pe":0,"pm":0,"rel":0,"ter":0},"network":"","output":{"ber":0,"col":"","mod":0,"nf":0,"out":0,"rad":"","res":0,"units":""},"receiver":{"alt":"","lat":"","lon":"","rxg":"","rxs":""},"site":"","transmitter":{"alt":"","bwi":"","frq":"","lat":"","lon":"","txw":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/area',
method: 'POST',
headers: {
key: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "antenna": {\n "ant": 0,\n "azi": 0,\n "hbw": 0,\n "pol": "",\n "tlt": "",\n "txg": "",\n "txl": "",\n "vbw": 0\n },\n "environment": {\n "cll": 0,\n "clm": 0,\n "mat": ""\n },\n "model": {\n "cli": 0,\n "ked": 0,\n "pe": 0,\n "pm": 0,\n "rel": 0,\n "ter": 0\n },\n "network": "",\n "output": {\n "ber": 0,\n "col": "",\n "mod": 0,\n "nf": 0,\n "out": 0,\n "rad": "",\n "res": 0,\n "units": ""\n },\n "receiver": {\n "alt": "",\n "lat": "",\n "lon": "",\n "rxg": "",\n "rxs": ""\n },\n "site": "",\n "transmitter": {\n "alt": "",\n "bwi": "",\n "frq": "",\n "lat": "",\n "lon": "",\n "txw": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/area")
.post(body)
.addHeader("key", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/area',
headers: {
key: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
antenna: {ant: 0, azi: 0, hbw: 0, pol: '', tlt: '', txg: '', txl: '', vbw: 0},
environment: {cll: 0, clm: 0, mat: ''},
model: {cli: 0, ked: 0, pe: 0, pm: 0, rel: 0, ter: 0},
network: '',
output: {ber: 0, col: '', mod: 0, nf: 0, out: 0, rad: '', res: 0, units: ''},
receiver: {alt: '', lat: '', lon: '', rxg: '', rxs: ''},
site: '',
transmitter: {alt: '', bwi: '', frq: '', lat: '', lon: '', txw: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/area',
headers: {key: '{{apiKey}}', 'content-type': 'application/json'},
body: {
antenna: {ant: 0, azi: 0, hbw: 0, pol: '', tlt: '', txg: '', txl: '', vbw: 0},
environment: {cll: 0, clm: 0, mat: ''},
model: {cli: 0, ked: 0, pe: 0, pm: 0, rel: 0, ter: 0},
network: '',
output: {ber: 0, col: '', mod: 0, nf: 0, out: 0, rad: '', res: 0, units: ''},
receiver: {alt: '', lat: '', lon: '', rxg: '', rxs: ''},
site: '',
transmitter: {alt: '', bwi: '', frq: '', lat: '', lon: '', txw: ''}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/area');
req.headers({
key: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
antenna: {
ant: 0,
azi: 0,
hbw: 0,
pol: '',
tlt: '',
txg: '',
txl: '',
vbw: 0
},
environment: {
cll: 0,
clm: 0,
mat: ''
},
model: {
cli: 0,
ked: 0,
pe: 0,
pm: 0,
rel: 0,
ter: 0
},
network: '',
output: {
ber: 0,
col: '',
mod: 0,
nf: 0,
out: 0,
rad: '',
res: 0,
units: ''
},
receiver: {
alt: '',
lat: '',
lon: '',
rxg: '',
rxs: ''
},
site: '',
transmitter: {
alt: '',
bwi: '',
frq: '',
lat: '',
lon: '',
txw: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/area',
headers: {key: '{{apiKey}}', 'content-type': 'application/json'},
data: {
antenna: {ant: 0, azi: 0, hbw: 0, pol: '', tlt: '', txg: '', txl: '', vbw: 0},
environment: {cll: 0, clm: 0, mat: ''},
model: {cli: 0, ked: 0, pe: 0, pm: 0, rel: 0, ter: 0},
network: '',
output: {ber: 0, col: '', mod: 0, nf: 0, out: 0, rad: '', res: 0, units: ''},
receiver: {alt: '', lat: '', lon: '', rxg: '', rxs: ''},
site: '',
transmitter: {alt: '', bwi: '', frq: '', lat: '', lon: '', txw: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/area';
const options = {
method: 'POST',
headers: {key: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"antenna":{"ant":0,"azi":0,"hbw":0,"pol":"","tlt":"","txg":"","txl":"","vbw":0},"environment":{"cll":0,"clm":0,"mat":""},"model":{"cli":0,"ked":0,"pe":0,"pm":0,"rel":0,"ter":0},"network":"","output":{"ber":0,"col":"","mod":0,"nf":0,"out":0,"rad":"","res":0,"units":""},"receiver":{"alt":"","lat":"","lon":"","rxg":"","rxs":""},"site":"","transmitter":{"alt":"","bwi":"","frq":"","lat":"","lon":"","txw":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"key": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"antenna": @{ @"ant": @0, @"azi": @0, @"hbw": @0, @"pol": @"", @"tlt": @"", @"txg": @"", @"txl": @"", @"vbw": @0 },
@"environment": @{ @"cll": @0, @"clm": @0, @"mat": @"" },
@"model": @{ @"cli": @0, @"ked": @0, @"pe": @0, @"pm": @0, @"rel": @0, @"ter": @0 },
@"network": @"",
@"output": @{ @"ber": @0, @"col": @"", @"mod": @0, @"nf": @0, @"out": @0, @"rad": @"", @"res": @0, @"units": @"" },
@"receiver": @{ @"alt": @"", @"lat": @"", @"lon": @"", @"rxg": @"", @"rxs": @"" },
@"site": @"",
@"transmitter": @{ @"alt": @"", @"bwi": @"", @"frq": @"", @"lat": @"", @"lon": @"", @"txw": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/area"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
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 "{{baseUrl}}/area" in
let headers = Header.add_list (Header.init ()) [
("key", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/area",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'antenna' => [
'ant' => 0,
'azi' => 0,
'hbw' => 0,
'pol' => '',
'tlt' => '',
'txg' => '',
'txl' => '',
'vbw' => 0
],
'environment' => [
'cll' => 0,
'clm' => 0,
'mat' => ''
],
'model' => [
'cli' => 0,
'ked' => 0,
'pe' => 0,
'pm' => 0,
'rel' => 0,
'ter' => 0
],
'network' => '',
'output' => [
'ber' => 0,
'col' => '',
'mod' => 0,
'nf' => 0,
'out' => 0,
'rad' => '',
'res' => 0,
'units' => ''
],
'receiver' => [
'alt' => '',
'lat' => '',
'lon' => '',
'rxg' => '',
'rxs' => ''
],
'site' => '',
'transmitter' => [
'alt' => '',
'bwi' => '',
'frq' => '',
'lat' => '',
'lon' => '',
'txw' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"key: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/area', [
'body' => '{
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}',
'headers' => [
'content-type' => 'application/json',
'key' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/area');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'key' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'antenna' => [
'ant' => 0,
'azi' => 0,
'hbw' => 0,
'pol' => '',
'tlt' => '',
'txg' => '',
'txl' => '',
'vbw' => 0
],
'environment' => [
'cll' => 0,
'clm' => 0,
'mat' => ''
],
'model' => [
'cli' => 0,
'ked' => 0,
'pe' => 0,
'pm' => 0,
'rel' => 0,
'ter' => 0
],
'network' => '',
'output' => [
'ber' => 0,
'col' => '',
'mod' => 0,
'nf' => 0,
'out' => 0,
'rad' => '',
'res' => 0,
'units' => ''
],
'receiver' => [
'alt' => '',
'lat' => '',
'lon' => '',
'rxg' => '',
'rxs' => ''
],
'site' => '',
'transmitter' => [
'alt' => '',
'bwi' => '',
'frq' => '',
'lat' => '',
'lon' => '',
'txw' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'antenna' => [
'ant' => 0,
'azi' => 0,
'hbw' => 0,
'pol' => '',
'tlt' => '',
'txg' => '',
'txl' => '',
'vbw' => 0
],
'environment' => [
'cll' => 0,
'clm' => 0,
'mat' => ''
],
'model' => [
'cli' => 0,
'ked' => 0,
'pe' => 0,
'pm' => 0,
'rel' => 0,
'ter' => 0
],
'network' => '',
'output' => [
'ber' => 0,
'col' => '',
'mod' => 0,
'nf' => 0,
'out' => 0,
'rad' => '',
'res' => 0,
'units' => ''
],
'receiver' => [
'alt' => '',
'lat' => '',
'lon' => '',
'rxg' => '',
'rxs' => ''
],
'site' => '',
'transmitter' => [
'alt' => '',
'bwi' => '',
'frq' => '',
'lat' => '',
'lon' => '',
'txw' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/area');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'key' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("key", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/area' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}'
$headers=@{}
$headers.Add("key", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/area' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}"
headers = {
'key': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/area", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/area"
payload = {
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}
headers = {
"key": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/area"
payload <- "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('key' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/area")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["key"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/area') do |req|
req.headers['key'] = '{{apiKey}}'
req.body = "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/area";
let payload = json!({
"antenna": json!({
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
}),
"environment": json!({
"cll": 0,
"clm": 0,
"mat": ""
}),
"model": json!({
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
}),
"network": "",
"output": json!({
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
}),
"receiver": json!({
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
}),
"site": "",
"transmitter": json!({
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("key", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/area \
--header 'content-type: application/json' \
--header 'key: {{apiKey}}' \
--data '{
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}'
echo '{
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}' | \
http POST {{baseUrl}}/area \
content-type:application/json \
key:'{{apiKey}}'
wget --quiet \
--method POST \
--header 'key: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "antenna": {\n "ant": 0,\n "azi": 0,\n "hbw": 0,\n "pol": "",\n "tlt": "",\n "txg": "",\n "txl": "",\n "vbw": 0\n },\n "environment": {\n "cll": 0,\n "clm": 0,\n "mat": ""\n },\n "model": {\n "cli": 0,\n "ked": 0,\n "pe": 0,\n "pm": 0,\n "rel": 0,\n "ter": 0\n },\n "network": "",\n "output": {\n "ber": 0,\n "col": "",\n "mod": 0,\n "nf": 0,\n "out": 0,\n "rad": "",\n "res": 0,\n "units": ""\n },\n "receiver": {\n "alt": "",\n "lat": "",\n "lon": "",\n "rxg": "",\n "rxs": ""\n },\n "site": "",\n "transmitter": {\n "alt": "",\n "bwi": "",\n "frq": "",\n "lat": "",\n "lon": "",\n "txw": ""\n }\n}' \
--output-document \
- {{baseUrl}}/area
import Foundation
let headers = [
"key": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"antenna": [
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
],
"environment": [
"cll": 0,
"clm": 0,
"mat": ""
],
"model": [
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
],
"network": "",
"output": [
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
],
"receiver": [
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
],
"site": "",
"transmitter": [
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/area")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Point-to-multipoint path profile analysis (Many Tx, one Rx)
{{baseUrl}}/points
HEADERS
key
{{apiKey}}
BODY json
{
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"points": [
{
"alt": "",
"lat": "",
"lon": ""
}
],
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/points");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "key: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"points\": [\n {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\"\n }\n ],\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/points" {:headers {:key "{{apiKey}}"}
:content-type :json
:form-params {:antenna {:ant 0
:azi 0
:hbw 0
:pol ""
:tlt ""
:txg ""
:txl ""
:vbw 0}
:environment {:cll 0
:clm 0
:mat ""}
:model {:cli 0
:ked 0
:pe 0
:pm 0
:rel 0
:ter 0}
:network ""
:output {:ber 0
:col ""
:mod 0
:nf 0
:out 0
:rad ""
:res 0
:units ""}
:points [{:alt ""
:lat ""
:lon ""}]
:receiver {:alt ""
:lat ""
:lon ""
:rxg ""
:rxs ""}
:site ""
:transmitter {:alt ""
:bwi ""
:frq ""
:lat ""
:lon ""
:txw ""}}})
require "http/client"
url = "{{baseUrl}}/points"
headers = HTTP::Headers{
"key" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"points\": [\n {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\"\n }\n ],\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/points"),
Headers =
{
{ "key", "{{apiKey}}" },
},
Content = new StringContent("{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"points\": [\n {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\"\n }\n ],\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/points");
var request = new RestRequest("", Method.Post);
request.AddHeader("key", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"points\": [\n {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\"\n }\n ],\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/points"
payload := strings.NewReader("{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"points\": [\n {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\"\n }\n ],\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("key", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/points HTTP/1.1
Key: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 756
{
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"points": [
{
"alt": "",
"lat": "",
"lon": ""
}
],
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/points")
.setHeader("key", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"points\": [\n {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\"\n }\n ],\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/points"))
.header("key", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"points\": [\n {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\"\n }\n ],\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"points\": [\n {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\"\n }\n ],\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/points")
.post(body)
.addHeader("key", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/points")
.header("key", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"points\": [\n {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\"\n }\n ],\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
antenna: {
ant: 0,
azi: 0,
hbw: 0,
pol: '',
tlt: '',
txg: '',
txl: '',
vbw: 0
},
environment: {
cll: 0,
clm: 0,
mat: ''
},
model: {
cli: 0,
ked: 0,
pe: 0,
pm: 0,
rel: 0,
ter: 0
},
network: '',
output: {
ber: 0,
col: '',
mod: 0,
nf: 0,
out: 0,
rad: '',
res: 0,
units: ''
},
points: [
{
alt: '',
lat: '',
lon: ''
}
],
receiver: {
alt: '',
lat: '',
lon: '',
rxg: '',
rxs: ''
},
site: '',
transmitter: {
alt: '',
bwi: '',
frq: '',
lat: '',
lon: '',
txw: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/points');
xhr.setRequestHeader('key', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/points',
headers: {key: '{{apiKey}}', 'content-type': 'application/json'},
data: {
antenna: {ant: 0, azi: 0, hbw: 0, pol: '', tlt: '', txg: '', txl: '', vbw: 0},
environment: {cll: 0, clm: 0, mat: ''},
model: {cli: 0, ked: 0, pe: 0, pm: 0, rel: 0, ter: 0},
network: '',
output: {ber: 0, col: '', mod: 0, nf: 0, out: 0, rad: '', res: 0, units: ''},
points: [{alt: '', lat: '', lon: ''}],
receiver: {alt: '', lat: '', lon: '', rxg: '', rxs: ''},
site: '',
transmitter: {alt: '', bwi: '', frq: '', lat: '', lon: '', txw: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/points';
const options = {
method: 'POST',
headers: {key: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"antenna":{"ant":0,"azi":0,"hbw":0,"pol":"","tlt":"","txg":"","txl":"","vbw":0},"environment":{"cll":0,"clm":0,"mat":""},"model":{"cli":0,"ked":0,"pe":0,"pm":0,"rel":0,"ter":0},"network":"","output":{"ber":0,"col":"","mod":0,"nf":0,"out":0,"rad":"","res":0,"units":""},"points":[{"alt":"","lat":"","lon":""}],"receiver":{"alt":"","lat":"","lon":"","rxg":"","rxs":""},"site":"","transmitter":{"alt":"","bwi":"","frq":"","lat":"","lon":"","txw":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/points',
method: 'POST',
headers: {
key: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "antenna": {\n "ant": 0,\n "azi": 0,\n "hbw": 0,\n "pol": "",\n "tlt": "",\n "txg": "",\n "txl": "",\n "vbw": 0\n },\n "environment": {\n "cll": 0,\n "clm": 0,\n "mat": ""\n },\n "model": {\n "cli": 0,\n "ked": 0,\n "pe": 0,\n "pm": 0,\n "rel": 0,\n "ter": 0\n },\n "network": "",\n "output": {\n "ber": 0,\n "col": "",\n "mod": 0,\n "nf": 0,\n "out": 0,\n "rad": "",\n "res": 0,\n "units": ""\n },\n "points": [\n {\n "alt": "",\n "lat": "",\n "lon": ""\n }\n ],\n "receiver": {\n "alt": "",\n "lat": "",\n "lon": "",\n "rxg": "",\n "rxs": ""\n },\n "site": "",\n "transmitter": {\n "alt": "",\n "bwi": "",\n "frq": "",\n "lat": "",\n "lon": "",\n "txw": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"points\": [\n {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\"\n }\n ],\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/points")
.post(body)
.addHeader("key", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/points',
headers: {
key: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
antenna: {ant: 0, azi: 0, hbw: 0, pol: '', tlt: '', txg: '', txl: '', vbw: 0},
environment: {cll: 0, clm: 0, mat: ''},
model: {cli: 0, ked: 0, pe: 0, pm: 0, rel: 0, ter: 0},
network: '',
output: {ber: 0, col: '', mod: 0, nf: 0, out: 0, rad: '', res: 0, units: ''},
points: [{alt: '', lat: '', lon: ''}],
receiver: {alt: '', lat: '', lon: '', rxg: '', rxs: ''},
site: '',
transmitter: {alt: '', bwi: '', frq: '', lat: '', lon: '', txw: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/points',
headers: {key: '{{apiKey}}', 'content-type': 'application/json'},
body: {
antenna: {ant: 0, azi: 0, hbw: 0, pol: '', tlt: '', txg: '', txl: '', vbw: 0},
environment: {cll: 0, clm: 0, mat: ''},
model: {cli: 0, ked: 0, pe: 0, pm: 0, rel: 0, ter: 0},
network: '',
output: {ber: 0, col: '', mod: 0, nf: 0, out: 0, rad: '', res: 0, units: ''},
points: [{alt: '', lat: '', lon: ''}],
receiver: {alt: '', lat: '', lon: '', rxg: '', rxs: ''},
site: '',
transmitter: {alt: '', bwi: '', frq: '', lat: '', lon: '', txw: ''}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/points');
req.headers({
key: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
antenna: {
ant: 0,
azi: 0,
hbw: 0,
pol: '',
tlt: '',
txg: '',
txl: '',
vbw: 0
},
environment: {
cll: 0,
clm: 0,
mat: ''
},
model: {
cli: 0,
ked: 0,
pe: 0,
pm: 0,
rel: 0,
ter: 0
},
network: '',
output: {
ber: 0,
col: '',
mod: 0,
nf: 0,
out: 0,
rad: '',
res: 0,
units: ''
},
points: [
{
alt: '',
lat: '',
lon: ''
}
],
receiver: {
alt: '',
lat: '',
lon: '',
rxg: '',
rxs: ''
},
site: '',
transmitter: {
alt: '',
bwi: '',
frq: '',
lat: '',
lon: '',
txw: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/points',
headers: {key: '{{apiKey}}', 'content-type': 'application/json'},
data: {
antenna: {ant: 0, azi: 0, hbw: 0, pol: '', tlt: '', txg: '', txl: '', vbw: 0},
environment: {cll: 0, clm: 0, mat: ''},
model: {cli: 0, ked: 0, pe: 0, pm: 0, rel: 0, ter: 0},
network: '',
output: {ber: 0, col: '', mod: 0, nf: 0, out: 0, rad: '', res: 0, units: ''},
points: [{alt: '', lat: '', lon: ''}],
receiver: {alt: '', lat: '', lon: '', rxg: '', rxs: ''},
site: '',
transmitter: {alt: '', bwi: '', frq: '', lat: '', lon: '', txw: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/points';
const options = {
method: 'POST',
headers: {key: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"antenna":{"ant":0,"azi":0,"hbw":0,"pol":"","tlt":"","txg":"","txl":"","vbw":0},"environment":{"cll":0,"clm":0,"mat":""},"model":{"cli":0,"ked":0,"pe":0,"pm":0,"rel":0,"ter":0},"network":"","output":{"ber":0,"col":"","mod":0,"nf":0,"out":0,"rad":"","res":0,"units":""},"points":[{"alt":"","lat":"","lon":""}],"receiver":{"alt":"","lat":"","lon":"","rxg":"","rxs":""},"site":"","transmitter":{"alt":"","bwi":"","frq":"","lat":"","lon":"","txw":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"key": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"antenna": @{ @"ant": @0, @"azi": @0, @"hbw": @0, @"pol": @"", @"tlt": @"", @"txg": @"", @"txl": @"", @"vbw": @0 },
@"environment": @{ @"cll": @0, @"clm": @0, @"mat": @"" },
@"model": @{ @"cli": @0, @"ked": @0, @"pe": @0, @"pm": @0, @"rel": @0, @"ter": @0 },
@"network": @"",
@"output": @{ @"ber": @0, @"col": @"", @"mod": @0, @"nf": @0, @"out": @0, @"rad": @"", @"res": @0, @"units": @"" },
@"points": @[ @{ @"alt": @"", @"lat": @"", @"lon": @"" } ],
@"receiver": @{ @"alt": @"", @"lat": @"", @"lon": @"", @"rxg": @"", @"rxs": @"" },
@"site": @"",
@"transmitter": @{ @"alt": @"", @"bwi": @"", @"frq": @"", @"lat": @"", @"lon": @"", @"txw": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/points"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
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 "{{baseUrl}}/points" in
let headers = Header.add_list (Header.init ()) [
("key", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"points\": [\n {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\"\n }\n ],\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/points",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'antenna' => [
'ant' => 0,
'azi' => 0,
'hbw' => 0,
'pol' => '',
'tlt' => '',
'txg' => '',
'txl' => '',
'vbw' => 0
],
'environment' => [
'cll' => 0,
'clm' => 0,
'mat' => ''
],
'model' => [
'cli' => 0,
'ked' => 0,
'pe' => 0,
'pm' => 0,
'rel' => 0,
'ter' => 0
],
'network' => '',
'output' => [
'ber' => 0,
'col' => '',
'mod' => 0,
'nf' => 0,
'out' => 0,
'rad' => '',
'res' => 0,
'units' => ''
],
'points' => [
[
'alt' => '',
'lat' => '',
'lon' => ''
]
],
'receiver' => [
'alt' => '',
'lat' => '',
'lon' => '',
'rxg' => '',
'rxs' => ''
],
'site' => '',
'transmitter' => [
'alt' => '',
'bwi' => '',
'frq' => '',
'lat' => '',
'lon' => '',
'txw' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"key: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/points', [
'body' => '{
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"points": [
{
"alt": "",
"lat": "",
"lon": ""
}
],
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}',
'headers' => [
'content-type' => 'application/json',
'key' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/points');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'key' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'antenna' => [
'ant' => 0,
'azi' => 0,
'hbw' => 0,
'pol' => '',
'tlt' => '',
'txg' => '',
'txl' => '',
'vbw' => 0
],
'environment' => [
'cll' => 0,
'clm' => 0,
'mat' => ''
],
'model' => [
'cli' => 0,
'ked' => 0,
'pe' => 0,
'pm' => 0,
'rel' => 0,
'ter' => 0
],
'network' => '',
'output' => [
'ber' => 0,
'col' => '',
'mod' => 0,
'nf' => 0,
'out' => 0,
'rad' => '',
'res' => 0,
'units' => ''
],
'points' => [
[
'alt' => '',
'lat' => '',
'lon' => ''
]
],
'receiver' => [
'alt' => '',
'lat' => '',
'lon' => '',
'rxg' => '',
'rxs' => ''
],
'site' => '',
'transmitter' => [
'alt' => '',
'bwi' => '',
'frq' => '',
'lat' => '',
'lon' => '',
'txw' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'antenna' => [
'ant' => 0,
'azi' => 0,
'hbw' => 0,
'pol' => '',
'tlt' => '',
'txg' => '',
'txl' => '',
'vbw' => 0
],
'environment' => [
'cll' => 0,
'clm' => 0,
'mat' => ''
],
'model' => [
'cli' => 0,
'ked' => 0,
'pe' => 0,
'pm' => 0,
'rel' => 0,
'ter' => 0
],
'network' => '',
'output' => [
'ber' => 0,
'col' => '',
'mod' => 0,
'nf' => 0,
'out' => 0,
'rad' => '',
'res' => 0,
'units' => ''
],
'points' => [
[
'alt' => '',
'lat' => '',
'lon' => ''
]
],
'receiver' => [
'alt' => '',
'lat' => '',
'lon' => '',
'rxg' => '',
'rxs' => ''
],
'site' => '',
'transmitter' => [
'alt' => '',
'bwi' => '',
'frq' => '',
'lat' => '',
'lon' => '',
'txw' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/points');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'key' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("key", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/points' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"points": [
{
"alt": "",
"lat": "",
"lon": ""
}
],
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}'
$headers=@{}
$headers.Add("key", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/points' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"points": [
{
"alt": "",
"lat": "",
"lon": ""
}
],
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"points\": [\n {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\"\n }\n ],\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}"
headers = {
'key': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/points", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/points"
payload = {
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"points": [
{
"alt": "",
"lat": "",
"lon": ""
}
],
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}
headers = {
"key": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/points"
payload <- "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"points\": [\n {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\"\n }\n ],\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('key' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/points")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["key"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"points\": [\n {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\"\n }\n ],\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/points') do |req|
req.headers['key'] = '{{apiKey}}'
req.body = "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"points\": [\n {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\"\n }\n ],\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/points";
let payload = json!({
"antenna": json!({
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
}),
"environment": json!({
"cll": 0,
"clm": 0,
"mat": ""
}),
"model": json!({
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
}),
"network": "",
"output": json!({
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
}),
"points": (
json!({
"alt": "",
"lat": "",
"lon": ""
})
),
"receiver": json!({
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
}),
"site": "",
"transmitter": json!({
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("key", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/points \
--header 'content-type: application/json' \
--header 'key: {{apiKey}}' \
--data '{
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"points": [
{
"alt": "",
"lat": "",
"lon": ""
}
],
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}'
echo '{
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"points": [
{
"alt": "",
"lat": "",
"lon": ""
}
],
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}' | \
http POST {{baseUrl}}/points \
content-type:application/json \
key:'{{apiKey}}'
wget --quiet \
--method POST \
--header 'key: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "antenna": {\n "ant": 0,\n "azi": 0,\n "hbw": 0,\n "pol": "",\n "tlt": "",\n "txg": "",\n "txl": "",\n "vbw": 0\n },\n "environment": {\n "cll": 0,\n "clm": 0,\n "mat": ""\n },\n "model": {\n "cli": 0,\n "ked": 0,\n "pe": 0,\n "pm": 0,\n "rel": 0,\n "ter": 0\n },\n "network": "",\n "output": {\n "ber": 0,\n "col": "",\n "mod": 0,\n "nf": 0,\n "out": 0,\n "rad": "",\n "res": 0,\n "units": ""\n },\n "points": [\n {\n "alt": "",\n "lat": "",\n "lon": ""\n }\n ],\n "receiver": {\n "alt": "",\n "lat": "",\n "lon": "",\n "rxg": "",\n "rxs": ""\n },\n "site": "",\n "transmitter": {\n "alt": "",\n "bwi": "",\n "frq": "",\n "lat": "",\n "lon": "",\n "txw": ""\n }\n}' \
--output-document \
- {{baseUrl}}/points
import Foundation
let headers = [
"key": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"antenna": [
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
],
"environment": [
"cll": 0,
"clm": 0,
"mat": ""
],
"model": [
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
],
"network": "",
"output": [
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
],
"points": [
[
"alt": "",
"lat": "",
"lon": ""
]
],
"receiver": [
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
],
"site": "",
"transmitter": [
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/points")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Point-to-point path profile analysis (Tx to Rx)
{{baseUrl}}/path
HEADERS
key
{{apiKey}}
BODY json
{
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/path");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "key: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/path" {:headers {:key "{{apiKey}}"}
:content-type :json
:form-params {:antenna {:ant 0
:azi 0
:hbw 0
:pol ""
:tlt ""
:txg ""
:txl ""
:vbw 0}
:environment {:cll 0
:clm 0
:mat ""}
:model {:cli 0
:ked 0
:pe 0
:pm 0
:rel 0
:ter 0}
:network ""
:output {:ber 0
:col ""
:mod 0
:nf 0
:out 0
:rad ""
:res 0
:units ""}
:receiver {:alt ""
:lat ""
:lon ""
:rxg ""
:rxs ""}
:site ""
:transmitter {:alt ""
:bwi ""
:frq ""
:lat ""
:lon ""
:txw ""}}})
require "http/client"
url = "{{baseUrl}}/path"
headers = HTTP::Headers{
"key" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/path"),
Headers =
{
{ "key", "{{apiKey}}" },
},
Content = new StringContent("{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/path");
var request = new RestRequest("", Method.Post);
request.AddHeader("key", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/path"
payload := strings.NewReader("{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("key", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/path HTTP/1.1
Key: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 675
{
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/path")
.setHeader("key", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/path"))
.header("key", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/path")
.post(body)
.addHeader("key", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/path")
.header("key", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
antenna: {
ant: 0,
azi: 0,
hbw: 0,
pol: '',
tlt: '',
txg: '',
txl: '',
vbw: 0
},
environment: {
cll: 0,
clm: 0,
mat: ''
},
model: {
cli: 0,
ked: 0,
pe: 0,
pm: 0,
rel: 0,
ter: 0
},
network: '',
output: {
ber: 0,
col: '',
mod: 0,
nf: 0,
out: 0,
rad: '',
res: 0,
units: ''
},
receiver: {
alt: '',
lat: '',
lon: '',
rxg: '',
rxs: ''
},
site: '',
transmitter: {
alt: '',
bwi: '',
frq: '',
lat: '',
lon: '',
txw: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/path');
xhr.setRequestHeader('key', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/path',
headers: {key: '{{apiKey}}', 'content-type': 'application/json'},
data: {
antenna: {ant: 0, azi: 0, hbw: 0, pol: '', tlt: '', txg: '', txl: '', vbw: 0},
environment: {cll: 0, clm: 0, mat: ''},
model: {cli: 0, ked: 0, pe: 0, pm: 0, rel: 0, ter: 0},
network: '',
output: {ber: 0, col: '', mod: 0, nf: 0, out: 0, rad: '', res: 0, units: ''},
receiver: {alt: '', lat: '', lon: '', rxg: '', rxs: ''},
site: '',
transmitter: {alt: '', bwi: '', frq: '', lat: '', lon: '', txw: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/path';
const options = {
method: 'POST',
headers: {key: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"antenna":{"ant":0,"azi":0,"hbw":0,"pol":"","tlt":"","txg":"","txl":"","vbw":0},"environment":{"cll":0,"clm":0,"mat":""},"model":{"cli":0,"ked":0,"pe":0,"pm":0,"rel":0,"ter":0},"network":"","output":{"ber":0,"col":"","mod":0,"nf":0,"out":0,"rad":"","res":0,"units":""},"receiver":{"alt":"","lat":"","lon":"","rxg":"","rxs":""},"site":"","transmitter":{"alt":"","bwi":"","frq":"","lat":"","lon":"","txw":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/path',
method: 'POST',
headers: {
key: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "antenna": {\n "ant": 0,\n "azi": 0,\n "hbw": 0,\n "pol": "",\n "tlt": "",\n "txg": "",\n "txl": "",\n "vbw": 0\n },\n "environment": {\n "cll": 0,\n "clm": 0,\n "mat": ""\n },\n "model": {\n "cli": 0,\n "ked": 0,\n "pe": 0,\n "pm": 0,\n "rel": 0,\n "ter": 0\n },\n "network": "",\n "output": {\n "ber": 0,\n "col": "",\n "mod": 0,\n "nf": 0,\n "out": 0,\n "rad": "",\n "res": 0,\n "units": ""\n },\n "receiver": {\n "alt": "",\n "lat": "",\n "lon": "",\n "rxg": "",\n "rxs": ""\n },\n "site": "",\n "transmitter": {\n "alt": "",\n "bwi": "",\n "frq": "",\n "lat": "",\n "lon": "",\n "txw": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/path")
.post(body)
.addHeader("key", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/path',
headers: {
key: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
antenna: {ant: 0, azi: 0, hbw: 0, pol: '', tlt: '', txg: '', txl: '', vbw: 0},
environment: {cll: 0, clm: 0, mat: ''},
model: {cli: 0, ked: 0, pe: 0, pm: 0, rel: 0, ter: 0},
network: '',
output: {ber: 0, col: '', mod: 0, nf: 0, out: 0, rad: '', res: 0, units: ''},
receiver: {alt: '', lat: '', lon: '', rxg: '', rxs: ''},
site: '',
transmitter: {alt: '', bwi: '', frq: '', lat: '', lon: '', txw: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/path',
headers: {key: '{{apiKey}}', 'content-type': 'application/json'},
body: {
antenna: {ant: 0, azi: 0, hbw: 0, pol: '', tlt: '', txg: '', txl: '', vbw: 0},
environment: {cll: 0, clm: 0, mat: ''},
model: {cli: 0, ked: 0, pe: 0, pm: 0, rel: 0, ter: 0},
network: '',
output: {ber: 0, col: '', mod: 0, nf: 0, out: 0, rad: '', res: 0, units: ''},
receiver: {alt: '', lat: '', lon: '', rxg: '', rxs: ''},
site: '',
transmitter: {alt: '', bwi: '', frq: '', lat: '', lon: '', txw: ''}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/path');
req.headers({
key: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
antenna: {
ant: 0,
azi: 0,
hbw: 0,
pol: '',
tlt: '',
txg: '',
txl: '',
vbw: 0
},
environment: {
cll: 0,
clm: 0,
mat: ''
},
model: {
cli: 0,
ked: 0,
pe: 0,
pm: 0,
rel: 0,
ter: 0
},
network: '',
output: {
ber: 0,
col: '',
mod: 0,
nf: 0,
out: 0,
rad: '',
res: 0,
units: ''
},
receiver: {
alt: '',
lat: '',
lon: '',
rxg: '',
rxs: ''
},
site: '',
transmitter: {
alt: '',
bwi: '',
frq: '',
lat: '',
lon: '',
txw: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/path',
headers: {key: '{{apiKey}}', 'content-type': 'application/json'},
data: {
antenna: {ant: 0, azi: 0, hbw: 0, pol: '', tlt: '', txg: '', txl: '', vbw: 0},
environment: {cll: 0, clm: 0, mat: ''},
model: {cli: 0, ked: 0, pe: 0, pm: 0, rel: 0, ter: 0},
network: '',
output: {ber: 0, col: '', mod: 0, nf: 0, out: 0, rad: '', res: 0, units: ''},
receiver: {alt: '', lat: '', lon: '', rxg: '', rxs: ''},
site: '',
transmitter: {alt: '', bwi: '', frq: '', lat: '', lon: '', txw: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/path';
const options = {
method: 'POST',
headers: {key: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"antenna":{"ant":0,"azi":0,"hbw":0,"pol":"","tlt":"","txg":"","txl":"","vbw":0},"environment":{"cll":0,"clm":0,"mat":""},"model":{"cli":0,"ked":0,"pe":0,"pm":0,"rel":0,"ter":0},"network":"","output":{"ber":0,"col":"","mod":0,"nf":0,"out":0,"rad":"","res":0,"units":""},"receiver":{"alt":"","lat":"","lon":"","rxg":"","rxs":""},"site":"","transmitter":{"alt":"","bwi":"","frq":"","lat":"","lon":"","txw":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"key": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"antenna": @{ @"ant": @0, @"azi": @0, @"hbw": @0, @"pol": @"", @"tlt": @"", @"txg": @"", @"txl": @"", @"vbw": @0 },
@"environment": @{ @"cll": @0, @"clm": @0, @"mat": @"" },
@"model": @{ @"cli": @0, @"ked": @0, @"pe": @0, @"pm": @0, @"rel": @0, @"ter": @0 },
@"network": @"",
@"output": @{ @"ber": @0, @"col": @"", @"mod": @0, @"nf": @0, @"out": @0, @"rad": @"", @"res": @0, @"units": @"" },
@"receiver": @{ @"alt": @"", @"lat": @"", @"lon": @"", @"rxg": @"", @"rxs": @"" },
@"site": @"",
@"transmitter": @{ @"alt": @"", @"bwi": @"", @"frq": @"", @"lat": @"", @"lon": @"", @"txw": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/path"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
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 "{{baseUrl}}/path" in
let headers = Header.add_list (Header.init ()) [
("key", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/path",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'antenna' => [
'ant' => 0,
'azi' => 0,
'hbw' => 0,
'pol' => '',
'tlt' => '',
'txg' => '',
'txl' => '',
'vbw' => 0
],
'environment' => [
'cll' => 0,
'clm' => 0,
'mat' => ''
],
'model' => [
'cli' => 0,
'ked' => 0,
'pe' => 0,
'pm' => 0,
'rel' => 0,
'ter' => 0
],
'network' => '',
'output' => [
'ber' => 0,
'col' => '',
'mod' => 0,
'nf' => 0,
'out' => 0,
'rad' => '',
'res' => 0,
'units' => ''
],
'receiver' => [
'alt' => '',
'lat' => '',
'lon' => '',
'rxg' => '',
'rxs' => ''
],
'site' => '',
'transmitter' => [
'alt' => '',
'bwi' => '',
'frq' => '',
'lat' => '',
'lon' => '',
'txw' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"key: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/path', [
'body' => '{
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}',
'headers' => [
'content-type' => 'application/json',
'key' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/path');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'key' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'antenna' => [
'ant' => 0,
'azi' => 0,
'hbw' => 0,
'pol' => '',
'tlt' => '',
'txg' => '',
'txl' => '',
'vbw' => 0
],
'environment' => [
'cll' => 0,
'clm' => 0,
'mat' => ''
],
'model' => [
'cli' => 0,
'ked' => 0,
'pe' => 0,
'pm' => 0,
'rel' => 0,
'ter' => 0
],
'network' => '',
'output' => [
'ber' => 0,
'col' => '',
'mod' => 0,
'nf' => 0,
'out' => 0,
'rad' => '',
'res' => 0,
'units' => ''
],
'receiver' => [
'alt' => '',
'lat' => '',
'lon' => '',
'rxg' => '',
'rxs' => ''
],
'site' => '',
'transmitter' => [
'alt' => '',
'bwi' => '',
'frq' => '',
'lat' => '',
'lon' => '',
'txw' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'antenna' => [
'ant' => 0,
'azi' => 0,
'hbw' => 0,
'pol' => '',
'tlt' => '',
'txg' => '',
'txl' => '',
'vbw' => 0
],
'environment' => [
'cll' => 0,
'clm' => 0,
'mat' => ''
],
'model' => [
'cli' => 0,
'ked' => 0,
'pe' => 0,
'pm' => 0,
'rel' => 0,
'ter' => 0
],
'network' => '',
'output' => [
'ber' => 0,
'col' => '',
'mod' => 0,
'nf' => 0,
'out' => 0,
'rad' => '',
'res' => 0,
'units' => ''
],
'receiver' => [
'alt' => '',
'lat' => '',
'lon' => '',
'rxg' => '',
'rxs' => ''
],
'site' => '',
'transmitter' => [
'alt' => '',
'bwi' => '',
'frq' => '',
'lat' => '',
'lon' => '',
'txw' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/path');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'key' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("key", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/path' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}'
$headers=@{}
$headers.Add("key", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/path' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}"
headers = {
'key': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/path", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/path"
payload = {
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}
headers = {
"key": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/path"
payload <- "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('key' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/path")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["key"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/path') do |req|
req.headers['key'] = '{{apiKey}}'
req.body = "{\n \"antenna\": {\n \"ant\": 0,\n \"azi\": 0,\n \"hbw\": 0,\n \"pol\": \"\",\n \"tlt\": \"\",\n \"txg\": \"\",\n \"txl\": \"\",\n \"vbw\": 0\n },\n \"environment\": {\n \"cll\": 0,\n \"clm\": 0,\n \"mat\": \"\"\n },\n \"model\": {\n \"cli\": 0,\n \"ked\": 0,\n \"pe\": 0,\n \"pm\": 0,\n \"rel\": 0,\n \"ter\": 0\n },\n \"network\": \"\",\n \"output\": {\n \"ber\": 0,\n \"col\": \"\",\n \"mod\": 0,\n \"nf\": 0,\n \"out\": 0,\n \"rad\": \"\",\n \"res\": 0,\n \"units\": \"\"\n },\n \"receiver\": {\n \"alt\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"rxg\": \"\",\n \"rxs\": \"\"\n },\n \"site\": \"\",\n \"transmitter\": {\n \"alt\": \"\",\n \"bwi\": \"\",\n \"frq\": \"\",\n \"lat\": \"\",\n \"lon\": \"\",\n \"txw\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/path";
let payload = json!({
"antenna": json!({
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
}),
"environment": json!({
"cll": 0,
"clm": 0,
"mat": ""
}),
"model": json!({
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
}),
"network": "",
"output": json!({
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
}),
"receiver": json!({
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
}),
"site": "",
"transmitter": json!({
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("key", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/path \
--header 'content-type: application/json' \
--header 'key: {{apiKey}}' \
--data '{
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}'
echo '{
"antenna": {
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
},
"environment": {
"cll": 0,
"clm": 0,
"mat": ""
},
"model": {
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
},
"network": "",
"output": {
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
},
"receiver": {
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
},
"site": "",
"transmitter": {
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
}
}' | \
http POST {{baseUrl}}/path \
content-type:application/json \
key:'{{apiKey}}'
wget --quiet \
--method POST \
--header 'key: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "antenna": {\n "ant": 0,\n "azi": 0,\n "hbw": 0,\n "pol": "",\n "tlt": "",\n "txg": "",\n "txl": "",\n "vbw": 0\n },\n "environment": {\n "cll": 0,\n "clm": 0,\n "mat": ""\n },\n "model": {\n "cli": 0,\n "ked": 0,\n "pe": 0,\n "pm": 0,\n "rel": 0,\n "ter": 0\n },\n "network": "",\n "output": {\n "ber": 0,\n "col": "",\n "mod": 0,\n "nf": 0,\n "out": 0,\n "rad": "",\n "res": 0,\n "units": ""\n },\n "receiver": {\n "alt": "",\n "lat": "",\n "lon": "",\n "rxg": "",\n "rxs": ""\n },\n "site": "",\n "transmitter": {\n "alt": "",\n "bwi": "",\n "frq": "",\n "lat": "",\n "lon": "",\n "txw": ""\n }\n}' \
--output-document \
- {{baseUrl}}/path
import Foundation
let headers = [
"key": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"antenna": [
"ant": 0,
"azi": 0,
"hbw": 0,
"pol": "",
"tlt": "",
"txg": "",
"txl": "",
"vbw": 0
],
"environment": [
"cll": 0,
"clm": 0,
"mat": ""
],
"model": [
"cli": 0,
"ked": 0,
"pe": 0,
"pm": 0,
"rel": 0,
"ter": 0
],
"network": "",
"output": [
"ber": 0,
"col": "",
"mod": 0,
"nf": 0,
"out": 0,
"rad": "",
"res": 0,
"units": ""
],
"receiver": [
"alt": "",
"lat": "",
"lon": "",
"rxg": "",
"rxs": ""
],
"site": "",
"transmitter": [
"alt": "",
"bwi": "",
"frq": "",
"lat": "",
"lon": "",
"txw": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/path")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Delete a calculation from the database.
{{baseUrl}}/archive/delete
HEADERS
key
{{apiKey}}
QUERY PARAMS
cid
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/archive/delete?cid=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "key: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/archive/delete" {:headers {:key "{{apiKey}}"}
:query-params {:cid ""}})
require "http/client"
url = "{{baseUrl}}/archive/delete?cid="
headers = HTTP::Headers{
"key" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/archive/delete?cid="),
Headers =
{
{ "key", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/archive/delete?cid=");
var request = new RestRequest("", Method.Get);
request.AddHeader("key", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/archive/delete?cid="
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("key", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/archive/delete?cid= HTTP/1.1
Key: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/archive/delete?cid=")
.setHeader("key", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/archive/delete?cid="))
.header("key", "{{apiKey}}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/archive/delete?cid=")
.get()
.addHeader("key", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/archive/delete?cid=")
.header("key", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/archive/delete?cid=');
xhr.setRequestHeader('key', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/archive/delete',
params: {cid: ''},
headers: {key: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/archive/delete?cid=';
const options = {method: 'GET', headers: {key: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/archive/delete?cid=',
method: 'GET',
headers: {
key: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/archive/delete?cid=")
.get()
.addHeader("key", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/archive/delete?cid=',
headers: {
key: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/archive/delete',
qs: {cid: ''},
headers: {key: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/archive/delete');
req.query({
cid: ''
});
req.headers({
key: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/archive/delete',
params: {cid: ''},
headers: {key: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/archive/delete?cid=';
const options = {method: 'GET', headers: {key: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"key": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/archive/delete?cid="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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 "{{baseUrl}}/archive/delete?cid=" in
let headers = Header.add (Header.init ()) "key" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/archive/delete?cid=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"key: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/archive/delete?cid=', [
'headers' => [
'key' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/archive/delete');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'cid' => ''
]);
$request->setHeaders([
'key' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/archive/delete');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'cid' => ''
]));
$request->setHeaders([
'key' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("key", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/archive/delete?cid=' -Method GET -Headers $headers
$headers=@{}
$headers.Add("key", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/archive/delete?cid=' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'key': "{{apiKey}}" }
conn.request("GET", "/baseUrl/archive/delete?cid=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/archive/delete"
querystring = {"cid":""}
headers = {"key": "{{apiKey}}"}
response = requests.get(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/archive/delete"
queryString <- list(cid = "")
response <- VERB("GET", url, query = queryString, add_headers('key' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/archive/delete?cid=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["key"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/archive/delete') do |req|
req.headers['key'] = '{{apiKey}}'
req.params['cid'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/archive/delete";
let querystring = [
("cid", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("key", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/archive/delete?cid=' \
--header 'key: {{apiKey}}'
http GET '{{baseUrl}}/archive/delete?cid=' \
key:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'key: {{apiKey}}' \
--output-document \
- '{{baseUrl}}/archive/delete?cid='
import Foundation
let headers = ["key": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/archive/delete?cid=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Delete an entire network
{{baseUrl}}/archive/delete/network
HEADERS
key
{{apiKey}}
QUERY PARAMS
nid
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/archive/delete/network?nid=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "key: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/archive/delete/network" {:headers {:key "{{apiKey}}"}
:query-params {:nid ""}})
require "http/client"
url = "{{baseUrl}}/archive/delete/network?nid="
headers = HTTP::Headers{
"key" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/archive/delete/network?nid="),
Headers =
{
{ "key", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/archive/delete/network?nid=");
var request = new RestRequest("", Method.Get);
request.AddHeader("key", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/archive/delete/network?nid="
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("key", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/archive/delete/network?nid= HTTP/1.1
Key: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/archive/delete/network?nid=")
.setHeader("key", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/archive/delete/network?nid="))
.header("key", "{{apiKey}}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/archive/delete/network?nid=")
.get()
.addHeader("key", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/archive/delete/network?nid=")
.header("key", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/archive/delete/network?nid=');
xhr.setRequestHeader('key', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/archive/delete/network',
params: {nid: ''},
headers: {key: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/archive/delete/network?nid=';
const options = {method: 'GET', headers: {key: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/archive/delete/network?nid=',
method: 'GET',
headers: {
key: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/archive/delete/network?nid=")
.get()
.addHeader("key", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/archive/delete/network?nid=',
headers: {
key: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/archive/delete/network',
qs: {nid: ''},
headers: {key: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/archive/delete/network');
req.query({
nid: ''
});
req.headers({
key: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/archive/delete/network',
params: {nid: ''},
headers: {key: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/archive/delete/network?nid=';
const options = {method: 'GET', headers: {key: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"key": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/archive/delete/network?nid="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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 "{{baseUrl}}/archive/delete/network?nid=" in
let headers = Header.add (Header.init ()) "key" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/archive/delete/network?nid=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"key: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/archive/delete/network?nid=', [
'headers' => [
'key' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/archive/delete/network');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'nid' => ''
]);
$request->setHeaders([
'key' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/archive/delete/network');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'nid' => ''
]));
$request->setHeaders([
'key' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("key", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/archive/delete/network?nid=' -Method GET -Headers $headers
$headers=@{}
$headers.Add("key", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/archive/delete/network?nid=' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'key': "{{apiKey}}" }
conn.request("GET", "/baseUrl/archive/delete/network?nid=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/archive/delete/network"
querystring = {"nid":""}
headers = {"key": "{{apiKey}}"}
response = requests.get(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/archive/delete/network"
queryString <- list(nid = "")
response <- VERB("GET", url, query = queryString, add_headers('key' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/archive/delete/network?nid=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["key"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/archive/delete/network') do |req|
req.headers['key'] = '{{apiKey}}'
req.params['nid'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/archive/delete/network";
let querystring = [
("nid", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("key", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/archive/delete/network?nid=' \
--header 'key: {{apiKey}}'
http GET '{{baseUrl}}/archive/delete/network?nid=' \
key:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'key: {{apiKey}}' \
--output-document \
- '{{baseUrl}}/archive/delete/network?nid='
import Foundation
let headers = ["key": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/archive/delete/network?nid=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Export a calculation in a GIS file format
{{baseUrl}}/archive/export
HEADERS
key
{{apiKey}}
QUERY PARAMS
file
fmt
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/archive/export?file=&fmt=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "key: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/archive/export" {:headers {:key "{{apiKey}}"}
:query-params {:file ""
:fmt ""}})
require "http/client"
url = "{{baseUrl}}/archive/export?file=&fmt="
headers = HTTP::Headers{
"key" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/archive/export?file=&fmt="),
Headers =
{
{ "key", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/archive/export?file=&fmt=");
var request = new RestRequest("", Method.Get);
request.AddHeader("key", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/archive/export?file=&fmt="
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("key", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/archive/export?file=&fmt= HTTP/1.1
Key: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/archive/export?file=&fmt=")
.setHeader("key", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/archive/export?file=&fmt="))
.header("key", "{{apiKey}}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/archive/export?file=&fmt=")
.get()
.addHeader("key", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/archive/export?file=&fmt=")
.header("key", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/archive/export?file=&fmt=');
xhr.setRequestHeader('key', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/archive/export',
params: {file: '', fmt: ''},
headers: {key: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/archive/export?file=&fmt=';
const options = {method: 'GET', headers: {key: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/archive/export?file=&fmt=',
method: 'GET',
headers: {
key: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/archive/export?file=&fmt=")
.get()
.addHeader("key", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/archive/export?file=&fmt=',
headers: {
key: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/archive/export',
qs: {file: '', fmt: ''},
headers: {key: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/archive/export');
req.query({
file: '',
fmt: ''
});
req.headers({
key: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/archive/export',
params: {file: '', fmt: ''},
headers: {key: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/archive/export?file=&fmt=';
const options = {method: 'GET', headers: {key: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"key": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/archive/export?file=&fmt="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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 "{{baseUrl}}/archive/export?file=&fmt=" in
let headers = Header.add (Header.init ()) "key" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/archive/export?file=&fmt=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"key: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/archive/export?file=&fmt=', [
'headers' => [
'key' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/archive/export');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'file' => '',
'fmt' => ''
]);
$request->setHeaders([
'key' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/archive/export');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'file' => '',
'fmt' => ''
]));
$request->setHeaders([
'key' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("key", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/archive/export?file=&fmt=' -Method GET -Headers $headers
$headers=@{}
$headers.Add("key", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/archive/export?file=&fmt=' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'key': "{{apiKey}}" }
conn.request("GET", "/baseUrl/archive/export?file=&fmt=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/archive/export"
querystring = {"file":"","fmt":""}
headers = {"key": "{{apiKey}}"}
response = requests.get(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/archive/export"
queryString <- list(
file = "",
fmt = ""
)
response <- VERB("GET", url, query = queryString, add_headers('key' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/archive/export?file=&fmt=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["key"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/archive/export') do |req|
req.headers['key'] = '{{apiKey}}'
req.params['file'] = ''
req.params['fmt'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/archive/export";
let querystring = [
("file", ""),
("fmt", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("key", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/archive/export?file=&fmt=' \
--header 'key: {{apiKey}}'
http GET '{{baseUrl}}/archive/export?file=&fmt=' \
key:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'key: {{apiKey}}' \
--output-document \
- '{{baseUrl}}/archive/export?file=&fmt='
import Foundation
let headers = ["key": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/archive/export?file=&fmt=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
List calculations from your archive
{{baseUrl}}/archive/list
HEADERS
key
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/archive/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "key: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/archive/list" {:headers {:key "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/archive/list"
headers = HTTP::Headers{
"key" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/archive/list"),
Headers =
{
{ "key", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/archive/list");
var request = new RestRequest("", Method.Get);
request.AddHeader("key", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/archive/list"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("key", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/archive/list HTTP/1.1
Key: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/archive/list")
.setHeader("key", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/archive/list"))
.header("key", "{{apiKey}}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/archive/list")
.get()
.addHeader("key", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/archive/list")
.header("key", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/archive/list');
xhr.setRequestHeader('key', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/archive/list',
headers: {key: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/archive/list';
const options = {method: 'GET', headers: {key: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/archive/list',
method: 'GET',
headers: {
key: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/archive/list")
.get()
.addHeader("key", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/archive/list',
headers: {
key: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/archive/list',
headers: {key: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/archive/list');
req.headers({
key: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/archive/list',
headers: {key: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/archive/list';
const options = {method: 'GET', headers: {key: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"key": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/archive/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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 "{{baseUrl}}/archive/list" in
let headers = Header.add (Header.init ()) "key" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/archive/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"key: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/archive/list', [
'headers' => [
'key' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/archive/list');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'key' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/archive/list');
$request->setRequestMethod('GET');
$request->setHeaders([
'key' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("key", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/archive/list' -Method GET -Headers $headers
$headers=@{}
$headers.Add("key", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/archive/list' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'key': "{{apiKey}}" }
conn.request("GET", "/baseUrl/archive/list", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/archive/list"
headers = {"key": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/archive/list"
response <- VERB("GET", url, add_headers('key' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/archive/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["key"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/archive/list') do |req|
req.headers['key'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/archive/list";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("key", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/archive/list \
--header 'key: {{apiKey}}'
http GET {{baseUrl}}/archive/list \
key:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'key: {{apiKey}}' \
--output-document \
- {{baseUrl}}/archive/list
import Foundation
let headers = ["key": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/archive/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Upload clutter data as GeoJSON
{{baseUrl}}/clutter/add
HEADERS
key
{{apiKey}}
BODY json
{
"features": [
{
"geometry": "",
"properties": "",
"type": ""
}
],
"name": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/clutter/add");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "key: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"features\": [\n {\n \"geometry\": \"\",\n \"properties\": \"\",\n \"type\": \"\"\n }\n ],\n \"name\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/clutter/add" {:headers {:key "{{apiKey}}"}
:content-type :json
:form-params {:features [{:geometry ""
:properties ""
:type ""}]
:name ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/clutter/add"
headers = HTTP::Headers{
"key" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"features\": [\n {\n \"geometry\": \"\",\n \"properties\": \"\",\n \"type\": \"\"\n }\n ],\n \"name\": \"\",\n \"type\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/clutter/add"),
Headers =
{
{ "key", "{{apiKey}}" },
},
Content = new StringContent("{\n \"features\": [\n {\n \"geometry\": \"\",\n \"properties\": \"\",\n \"type\": \"\"\n }\n ],\n \"name\": \"\",\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/clutter/add");
var request = new RestRequest("", Method.Post);
request.AddHeader("key", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"features\": [\n {\n \"geometry\": \"\",\n \"properties\": \"\",\n \"type\": \"\"\n }\n ],\n \"name\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/clutter/add"
payload := strings.NewReader("{\n \"features\": [\n {\n \"geometry\": \"\",\n \"properties\": \"\",\n \"type\": \"\"\n }\n ],\n \"name\": \"\",\n \"type\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("key", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/clutter/add HTTP/1.1
Key: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 126
{
"features": [
{
"geometry": "",
"properties": "",
"type": ""
}
],
"name": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/clutter/add")
.setHeader("key", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"features\": [\n {\n \"geometry\": \"\",\n \"properties\": \"\",\n \"type\": \"\"\n }\n ],\n \"name\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/clutter/add"))
.header("key", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"features\": [\n {\n \"geometry\": \"\",\n \"properties\": \"\",\n \"type\": \"\"\n }\n ],\n \"name\": \"\",\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"features\": [\n {\n \"geometry\": \"\",\n \"properties\": \"\",\n \"type\": \"\"\n }\n ],\n \"name\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/clutter/add")
.post(body)
.addHeader("key", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/clutter/add")
.header("key", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"features\": [\n {\n \"geometry\": \"\",\n \"properties\": \"\",\n \"type\": \"\"\n }\n ],\n \"name\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
features: [
{
geometry: '',
properties: '',
type: ''
}
],
name: '',
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/clutter/add');
xhr.setRequestHeader('key', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/clutter/add',
headers: {key: '{{apiKey}}', 'content-type': 'application/json'},
data: {features: [{geometry: '', properties: '', type: ''}], name: '', type: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/clutter/add';
const options = {
method: 'POST',
headers: {key: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"features":[{"geometry":"","properties":"","type":""}],"name":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/clutter/add',
method: 'POST',
headers: {
key: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "features": [\n {\n "geometry": "",\n "properties": "",\n "type": ""\n }\n ],\n "name": "",\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"features\": [\n {\n \"geometry\": \"\",\n \"properties\": \"\",\n \"type\": \"\"\n }\n ],\n \"name\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/clutter/add")
.post(body)
.addHeader("key", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/clutter/add',
headers: {
key: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({features: [{geometry: '', properties: '', type: ''}], name: '', type: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/clutter/add',
headers: {key: '{{apiKey}}', 'content-type': 'application/json'},
body: {features: [{geometry: '', properties: '', type: ''}], name: '', type: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/clutter/add');
req.headers({
key: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
features: [
{
geometry: '',
properties: '',
type: ''
}
],
name: '',
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/clutter/add',
headers: {key: '{{apiKey}}', 'content-type': 'application/json'},
data: {features: [{geometry: '', properties: '', type: ''}], name: '', type: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/clutter/add';
const options = {
method: 'POST',
headers: {key: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"features":[{"geometry":"","properties":"","type":""}],"name":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"key": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"features": @[ @{ @"geometry": @"", @"properties": @"", @"type": @"" } ],
@"name": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/clutter/add"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
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 "{{baseUrl}}/clutter/add" in
let headers = Header.add_list (Header.init ()) [
("key", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"features\": [\n {\n \"geometry\": \"\",\n \"properties\": \"\",\n \"type\": \"\"\n }\n ],\n \"name\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/clutter/add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'features' => [
[
'geometry' => '',
'properties' => '',
'type' => ''
]
],
'name' => '',
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"key: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/clutter/add', [
'body' => '{
"features": [
{
"geometry": "",
"properties": "",
"type": ""
}
],
"name": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
'key' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/clutter/add');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'key' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'features' => [
[
'geometry' => '',
'properties' => '',
'type' => ''
]
],
'name' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'features' => [
[
'geometry' => '',
'properties' => '',
'type' => ''
]
],
'name' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/clutter/add');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'key' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("key", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/clutter/add' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"features": [
{
"geometry": "",
"properties": "",
"type": ""
}
],
"name": "",
"type": ""
}'
$headers=@{}
$headers.Add("key", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/clutter/add' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"features": [
{
"geometry": "",
"properties": "",
"type": ""
}
],
"name": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"features\": [\n {\n \"geometry\": \"\",\n \"properties\": \"\",\n \"type\": \"\"\n }\n ],\n \"name\": \"\",\n \"type\": \"\"\n}"
headers = {
'key': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/clutter/add", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/clutter/add"
payload = {
"features": [
{
"geometry": "",
"properties": "",
"type": ""
}
],
"name": "",
"type": ""
}
headers = {
"key": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/clutter/add"
payload <- "{\n \"features\": [\n {\n \"geometry\": \"\",\n \"properties\": \"\",\n \"type\": \"\"\n }\n ],\n \"name\": \"\",\n \"type\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('key' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/clutter/add")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["key"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"features\": [\n {\n \"geometry\": \"\",\n \"properties\": \"\",\n \"type\": \"\"\n }\n ],\n \"name\": \"\",\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/clutter/add') do |req|
req.headers['key'] = '{{apiKey}}'
req.body = "{\n \"features\": [\n {\n \"geometry\": \"\",\n \"properties\": \"\",\n \"type\": \"\"\n }\n ],\n \"name\": \"\",\n \"type\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/clutter/add";
let payload = json!({
"features": (
json!({
"geometry": "",
"properties": "",
"type": ""
})
),
"name": "",
"type": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("key", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/clutter/add \
--header 'content-type: application/json' \
--header 'key: {{apiKey}}' \
--data '{
"features": [
{
"geometry": "",
"properties": "",
"type": ""
}
],
"name": "",
"type": ""
}'
echo '{
"features": [
{
"geometry": "",
"properties": "",
"type": ""
}
],
"name": "",
"type": ""
}' | \
http POST {{baseUrl}}/clutter/add \
content-type:application/json \
key:'{{apiKey}}'
wget --quiet \
--method POST \
--header 'key: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "features": [\n {\n "geometry": "",\n "properties": "",\n "type": ""\n }\n ],\n "name": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/clutter/add
import Foundation
let headers = [
"key": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"features": [
[
"geometry": "",
"properties": "",
"type": ""
]
],
"name": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/clutter/add")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()