Tunarr
GET
GetChannelFallbacks
{{baseUrl}}/api/channels/:id/fallbacks
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/channels/:id/fallbacks");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/channels/:id/fallbacks")
require "http/client"
url = "{{baseUrl}}/api/channels/:id/fallbacks"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/channels/:id/fallbacks"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/channels/:id/fallbacks");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/channels/:id/fallbacks"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/channels/:id/fallbacks HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/channels/:id/fallbacks")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/channels/:id/fallbacks"))
.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}}/api/channels/:id/fallbacks")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/channels/:id/fallbacks")
.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}}/api/channels/:id/fallbacks');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/channels/:id/fallbacks'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/channels/:id/fallbacks';
const options = {method: 'GET'};
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}}/api/channels/:id/fallbacks',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/channels/:id/fallbacks")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/channels/:id/fallbacks',
headers: {}
};
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}}/api/channels/:id/fallbacks'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/channels/:id/fallbacks');
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}}/api/channels/:id/fallbacks'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/channels/:id/fallbacks';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/channels/:id/fallbacks"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/channels/:id/fallbacks" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/channels/:id/fallbacks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/channels/:id/fallbacks');
echo $response->getBody();
setUrl('{{baseUrl}}/api/channels/:id/fallbacks');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/channels/:id/fallbacks');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/channels/:id/fallbacks' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/channels/:id/fallbacks' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/channels/:id/fallbacks")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/channels/:id/fallbacks"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/channels/:id/fallbacks"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/channels/:id/fallbacks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/channels/:id/fallbacks') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/channels/:id/fallbacks";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/channels/:id/fallbacks
http GET {{baseUrl}}/api/channels/:id/fallbacks
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/channels/:id/fallbacks
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/channels/:id/fallbacks")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
createChannelV2
{{baseUrl}}/api/channels
BODY json
{
"disableFillerOverlay": false,
"duration": "",
"fillerCollections": [
{
"id": "",
"weight": "",
"cooldownSeconds": ""
}
],
"fillerRepeatCooldown": "",
"groupTitle": "",
"guideFlexTitle": "",
"guideMinimumDuration": "",
"icon": {
"path": "",
"width": "",
"duration": "",
"position": ""
},
"id": "",
"name": "",
"number": "",
"offline": {
"picture": "",
"soundtrack": "",
"mode": ""
},
"startTime": "",
"stealth": false,
"transcoding": {
"targetResolution": "",
"videoBitrate": "",
"videoBufferSize": ""
},
"watermark": {
"url": "",
"enabled": false,
"position": "",
"width": "",
"verticalMargin": "",
"horizontalMargin": "",
"duration": "",
"fixedSize": false,
"animated": false,
"opacity": 0,
"fadeConfig": [
{
"programType": "",
"periodMins": "",
"leadingEdge": false
}
]
},
"onDemand": {
"enabled": false
},
"streamMode": "",
"transcodeConfigId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/channels");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/channels" {:content-type :json
:form-params {:disableFillerOverlay false
:duration ""
:fillerCollections [{:id ""
:weight ""
:cooldownSeconds ""}]
:fillerRepeatCooldown ""
:groupTitle ""
:guideFlexTitle ""
:guideMinimumDuration ""
:icon {:path ""
:width ""
:duration ""
:position ""}
:id ""
:name ""
:number ""
:offline {:picture ""
:soundtrack ""
:mode ""}
:startTime ""
:stealth false
:transcoding {:targetResolution ""
:videoBitrate ""
:videoBufferSize ""}
:watermark {:url ""
:enabled false
:position ""
:width ""
:verticalMargin ""
:horizontalMargin ""
:duration ""
:fixedSize false
:animated false
:opacity 0
:fadeConfig [{:programType ""
:periodMins ""
:leadingEdge false}]}
:onDemand {:enabled false}
:streamMode ""
:transcodeConfigId ""}})
require "http/client"
url = "{{baseUrl}}/api/channels"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\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}}/api/channels"),
Content = new StringContent("{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\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}}/api/channels");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/channels"
payload := strings.NewReader("{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/api/channels HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1059
{
"disableFillerOverlay": false,
"duration": "",
"fillerCollections": [
{
"id": "",
"weight": "",
"cooldownSeconds": ""
}
],
"fillerRepeatCooldown": "",
"groupTitle": "",
"guideFlexTitle": "",
"guideMinimumDuration": "",
"icon": {
"path": "",
"width": "",
"duration": "",
"position": ""
},
"id": "",
"name": "",
"number": "",
"offline": {
"picture": "",
"soundtrack": "",
"mode": ""
},
"startTime": "",
"stealth": false,
"transcoding": {
"targetResolution": "",
"videoBitrate": "",
"videoBufferSize": ""
},
"watermark": {
"url": "",
"enabled": false,
"position": "",
"width": "",
"verticalMargin": "",
"horizontalMargin": "",
"duration": "",
"fixedSize": false,
"animated": false,
"opacity": 0,
"fadeConfig": [
{
"programType": "",
"periodMins": "",
"leadingEdge": false
}
]
},
"onDemand": {
"enabled": false
},
"streamMode": "",
"transcodeConfigId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/channels")
.setHeader("content-type", "application/json")
.setBody("{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/channels"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\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 \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/channels")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/channels")
.header("content-type", "application/json")
.body("{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}")
.asString();
const data = JSON.stringify({
disableFillerOverlay: false,
duration: '',
fillerCollections: [
{
id: '',
weight: '',
cooldownSeconds: ''
}
],
fillerRepeatCooldown: '',
groupTitle: '',
guideFlexTitle: '',
guideMinimumDuration: '',
icon: {
path: '',
width: '',
duration: '',
position: ''
},
id: '',
name: '',
number: '',
offline: {
picture: '',
soundtrack: '',
mode: ''
},
startTime: '',
stealth: false,
transcoding: {
targetResolution: '',
videoBitrate: '',
videoBufferSize: ''
},
watermark: {
url: '',
enabled: false,
position: '',
width: '',
verticalMargin: '',
horizontalMargin: '',
duration: '',
fixedSize: false,
animated: false,
opacity: 0,
fadeConfig: [
{
programType: '',
periodMins: '',
leadingEdge: false
}
]
},
onDemand: {
enabled: false
},
streamMode: '',
transcodeConfigId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/channels');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/channels',
headers: {'content-type': 'application/json'},
data: {
disableFillerOverlay: false,
duration: '',
fillerCollections: [{id: '', weight: '', cooldownSeconds: ''}],
fillerRepeatCooldown: '',
groupTitle: '',
guideFlexTitle: '',
guideMinimumDuration: '',
icon: {path: '', width: '', duration: '', position: ''},
id: '',
name: '',
number: '',
offline: {picture: '', soundtrack: '', mode: ''},
startTime: '',
stealth: false,
transcoding: {targetResolution: '', videoBitrate: '', videoBufferSize: ''},
watermark: {
url: '',
enabled: false,
position: '',
width: '',
verticalMargin: '',
horizontalMargin: '',
duration: '',
fixedSize: false,
animated: false,
opacity: 0,
fadeConfig: [{programType: '', periodMins: '', leadingEdge: false}]
},
onDemand: {enabled: false},
streamMode: '',
transcodeConfigId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/channels';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"disableFillerOverlay":false,"duration":"","fillerCollections":[{"id":"","weight":"","cooldownSeconds":""}],"fillerRepeatCooldown":"","groupTitle":"","guideFlexTitle":"","guideMinimumDuration":"","icon":{"path":"","width":"","duration":"","position":""},"id":"","name":"","number":"","offline":{"picture":"","soundtrack":"","mode":""},"startTime":"","stealth":false,"transcoding":{"targetResolution":"","videoBitrate":"","videoBufferSize":""},"watermark":{"url":"","enabled":false,"position":"","width":"","verticalMargin":"","horizontalMargin":"","duration":"","fixedSize":false,"animated":false,"opacity":0,"fadeConfig":[{"programType":"","periodMins":"","leadingEdge":false}]},"onDemand":{"enabled":false},"streamMode":"","transcodeConfigId":""}'
};
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}}/api/channels',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "disableFillerOverlay": false,\n "duration": "",\n "fillerCollections": [\n {\n "id": "",\n "weight": "",\n "cooldownSeconds": ""\n }\n ],\n "fillerRepeatCooldown": "",\n "groupTitle": "",\n "guideFlexTitle": "",\n "guideMinimumDuration": "",\n "icon": {\n "path": "",\n "width": "",\n "duration": "",\n "position": ""\n },\n "id": "",\n "name": "",\n "number": "",\n "offline": {\n "picture": "",\n "soundtrack": "",\n "mode": ""\n },\n "startTime": "",\n "stealth": false,\n "transcoding": {\n "targetResolution": "",\n "videoBitrate": "",\n "videoBufferSize": ""\n },\n "watermark": {\n "url": "",\n "enabled": false,\n "position": "",\n "width": "",\n "verticalMargin": "",\n "horizontalMargin": "",\n "duration": "",\n "fixedSize": false,\n "animated": false,\n "opacity": 0,\n "fadeConfig": [\n {\n "programType": "",\n "periodMins": "",\n "leadingEdge": false\n }\n ]\n },\n "onDemand": {\n "enabled": false\n },\n "streamMode": "",\n "transcodeConfigId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/channels")
.post(body)
.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/api/channels',
headers: {
'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({
disableFillerOverlay: false,
duration: '',
fillerCollections: [{id: '', weight: '', cooldownSeconds: ''}],
fillerRepeatCooldown: '',
groupTitle: '',
guideFlexTitle: '',
guideMinimumDuration: '',
icon: {path: '', width: '', duration: '', position: ''},
id: '',
name: '',
number: '',
offline: {picture: '', soundtrack: '', mode: ''},
startTime: '',
stealth: false,
transcoding: {targetResolution: '', videoBitrate: '', videoBufferSize: ''},
watermark: {
url: '',
enabled: false,
position: '',
width: '',
verticalMargin: '',
horizontalMargin: '',
duration: '',
fixedSize: false,
animated: false,
opacity: 0,
fadeConfig: [{programType: '', periodMins: '', leadingEdge: false}]
},
onDemand: {enabled: false},
streamMode: '',
transcodeConfigId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/channels',
headers: {'content-type': 'application/json'},
body: {
disableFillerOverlay: false,
duration: '',
fillerCollections: [{id: '', weight: '', cooldownSeconds: ''}],
fillerRepeatCooldown: '',
groupTitle: '',
guideFlexTitle: '',
guideMinimumDuration: '',
icon: {path: '', width: '', duration: '', position: ''},
id: '',
name: '',
number: '',
offline: {picture: '', soundtrack: '', mode: ''},
startTime: '',
stealth: false,
transcoding: {targetResolution: '', videoBitrate: '', videoBufferSize: ''},
watermark: {
url: '',
enabled: false,
position: '',
width: '',
verticalMargin: '',
horizontalMargin: '',
duration: '',
fixedSize: false,
animated: false,
opacity: 0,
fadeConfig: [{programType: '', periodMins: '', leadingEdge: false}]
},
onDemand: {enabled: false},
streamMode: '',
transcodeConfigId: ''
},
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}}/api/channels');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
disableFillerOverlay: false,
duration: '',
fillerCollections: [
{
id: '',
weight: '',
cooldownSeconds: ''
}
],
fillerRepeatCooldown: '',
groupTitle: '',
guideFlexTitle: '',
guideMinimumDuration: '',
icon: {
path: '',
width: '',
duration: '',
position: ''
},
id: '',
name: '',
number: '',
offline: {
picture: '',
soundtrack: '',
mode: ''
},
startTime: '',
stealth: false,
transcoding: {
targetResolution: '',
videoBitrate: '',
videoBufferSize: ''
},
watermark: {
url: '',
enabled: false,
position: '',
width: '',
verticalMargin: '',
horizontalMargin: '',
duration: '',
fixedSize: false,
animated: false,
opacity: 0,
fadeConfig: [
{
programType: '',
periodMins: '',
leadingEdge: false
}
]
},
onDemand: {
enabled: false
},
streamMode: '',
transcodeConfigId: ''
});
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}}/api/channels',
headers: {'content-type': 'application/json'},
data: {
disableFillerOverlay: false,
duration: '',
fillerCollections: [{id: '', weight: '', cooldownSeconds: ''}],
fillerRepeatCooldown: '',
groupTitle: '',
guideFlexTitle: '',
guideMinimumDuration: '',
icon: {path: '', width: '', duration: '', position: ''},
id: '',
name: '',
number: '',
offline: {picture: '', soundtrack: '', mode: ''},
startTime: '',
stealth: false,
transcoding: {targetResolution: '', videoBitrate: '', videoBufferSize: ''},
watermark: {
url: '',
enabled: false,
position: '',
width: '',
verticalMargin: '',
horizontalMargin: '',
duration: '',
fixedSize: false,
animated: false,
opacity: 0,
fadeConfig: [{programType: '', periodMins: '', leadingEdge: false}]
},
onDemand: {enabled: false},
streamMode: '',
transcodeConfigId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/channels';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"disableFillerOverlay":false,"duration":"","fillerCollections":[{"id":"","weight":"","cooldownSeconds":""}],"fillerRepeatCooldown":"","groupTitle":"","guideFlexTitle":"","guideMinimumDuration":"","icon":{"path":"","width":"","duration":"","position":""},"id":"","name":"","number":"","offline":{"picture":"","soundtrack":"","mode":""},"startTime":"","stealth":false,"transcoding":{"targetResolution":"","videoBitrate":"","videoBufferSize":""},"watermark":{"url":"","enabled":false,"position":"","width":"","verticalMargin":"","horizontalMargin":"","duration":"","fixedSize":false,"animated":false,"opacity":0,"fadeConfig":[{"programType":"","periodMins":"","leadingEdge":false}]},"onDemand":{"enabled":false},"streamMode":"","transcodeConfigId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"disableFillerOverlay": @NO,
@"duration": @"",
@"fillerCollections": @[ @{ @"id": @"", @"weight": @"", @"cooldownSeconds": @"" } ],
@"fillerRepeatCooldown": @"",
@"groupTitle": @"",
@"guideFlexTitle": @"",
@"guideMinimumDuration": @"",
@"icon": @{ @"path": @"", @"width": @"", @"duration": @"", @"position": @"" },
@"id": @"",
@"name": @"",
@"number": @"",
@"offline": @{ @"picture": @"", @"soundtrack": @"", @"mode": @"" },
@"startTime": @"",
@"stealth": @NO,
@"transcoding": @{ @"targetResolution": @"", @"videoBitrate": @"", @"videoBufferSize": @"" },
@"watermark": @{ @"url": @"", @"enabled": @NO, @"position": @"", @"width": @"", @"verticalMargin": @"", @"horizontalMargin": @"", @"duration": @"", @"fixedSize": @NO, @"animated": @NO, @"opacity": @0, @"fadeConfig": @[ @{ @"programType": @"", @"periodMins": @"", @"leadingEdge": @NO } ] },
@"onDemand": @{ @"enabled": @NO },
@"streamMode": @"",
@"transcodeConfigId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/channels"]
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}}/api/channels" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/channels",
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([
'disableFillerOverlay' => null,
'duration' => '',
'fillerCollections' => [
[
'id' => '',
'weight' => '',
'cooldownSeconds' => ''
]
],
'fillerRepeatCooldown' => '',
'groupTitle' => '',
'guideFlexTitle' => '',
'guideMinimumDuration' => '',
'icon' => [
'path' => '',
'width' => '',
'duration' => '',
'position' => ''
],
'id' => '',
'name' => '',
'number' => '',
'offline' => [
'picture' => '',
'soundtrack' => '',
'mode' => ''
],
'startTime' => '',
'stealth' => null,
'transcoding' => [
'targetResolution' => '',
'videoBitrate' => '',
'videoBufferSize' => ''
],
'watermark' => [
'url' => '',
'enabled' => null,
'position' => '',
'width' => '',
'verticalMargin' => '',
'horizontalMargin' => '',
'duration' => '',
'fixedSize' => null,
'animated' => null,
'opacity' => 0,
'fadeConfig' => [
[
'programType' => '',
'periodMins' => '',
'leadingEdge' => null
]
]
],
'onDemand' => [
'enabled' => null
],
'streamMode' => '',
'transcodeConfigId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/channels', [
'body' => '{
"disableFillerOverlay": false,
"duration": "",
"fillerCollections": [
{
"id": "",
"weight": "",
"cooldownSeconds": ""
}
],
"fillerRepeatCooldown": "",
"groupTitle": "",
"guideFlexTitle": "",
"guideMinimumDuration": "",
"icon": {
"path": "",
"width": "",
"duration": "",
"position": ""
},
"id": "",
"name": "",
"number": "",
"offline": {
"picture": "",
"soundtrack": "",
"mode": ""
},
"startTime": "",
"stealth": false,
"transcoding": {
"targetResolution": "",
"videoBitrate": "",
"videoBufferSize": ""
},
"watermark": {
"url": "",
"enabled": false,
"position": "",
"width": "",
"verticalMargin": "",
"horizontalMargin": "",
"duration": "",
"fixedSize": false,
"animated": false,
"opacity": 0,
"fadeConfig": [
{
"programType": "",
"periodMins": "",
"leadingEdge": false
}
]
},
"onDemand": {
"enabled": false
},
"streamMode": "",
"transcodeConfigId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/channels');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'disableFillerOverlay' => null,
'duration' => '',
'fillerCollections' => [
[
'id' => '',
'weight' => '',
'cooldownSeconds' => ''
]
],
'fillerRepeatCooldown' => '',
'groupTitle' => '',
'guideFlexTitle' => '',
'guideMinimumDuration' => '',
'icon' => [
'path' => '',
'width' => '',
'duration' => '',
'position' => ''
],
'id' => '',
'name' => '',
'number' => '',
'offline' => [
'picture' => '',
'soundtrack' => '',
'mode' => ''
],
'startTime' => '',
'stealth' => null,
'transcoding' => [
'targetResolution' => '',
'videoBitrate' => '',
'videoBufferSize' => ''
],
'watermark' => [
'url' => '',
'enabled' => null,
'position' => '',
'width' => '',
'verticalMargin' => '',
'horizontalMargin' => '',
'duration' => '',
'fixedSize' => null,
'animated' => null,
'opacity' => 0,
'fadeConfig' => [
[
'programType' => '',
'periodMins' => '',
'leadingEdge' => null
]
]
],
'onDemand' => [
'enabled' => null
],
'streamMode' => '',
'transcodeConfigId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'disableFillerOverlay' => null,
'duration' => '',
'fillerCollections' => [
[
'id' => '',
'weight' => '',
'cooldownSeconds' => ''
]
],
'fillerRepeatCooldown' => '',
'groupTitle' => '',
'guideFlexTitle' => '',
'guideMinimumDuration' => '',
'icon' => [
'path' => '',
'width' => '',
'duration' => '',
'position' => ''
],
'id' => '',
'name' => '',
'number' => '',
'offline' => [
'picture' => '',
'soundtrack' => '',
'mode' => ''
],
'startTime' => '',
'stealth' => null,
'transcoding' => [
'targetResolution' => '',
'videoBitrate' => '',
'videoBufferSize' => ''
],
'watermark' => [
'url' => '',
'enabled' => null,
'position' => '',
'width' => '',
'verticalMargin' => '',
'horizontalMargin' => '',
'duration' => '',
'fixedSize' => null,
'animated' => null,
'opacity' => 0,
'fadeConfig' => [
[
'programType' => '',
'periodMins' => '',
'leadingEdge' => null
]
]
],
'onDemand' => [
'enabled' => null
],
'streamMode' => '',
'transcodeConfigId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/channels');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/channels' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"disableFillerOverlay": false,
"duration": "",
"fillerCollections": [
{
"id": "",
"weight": "",
"cooldownSeconds": ""
}
],
"fillerRepeatCooldown": "",
"groupTitle": "",
"guideFlexTitle": "",
"guideMinimumDuration": "",
"icon": {
"path": "",
"width": "",
"duration": "",
"position": ""
},
"id": "",
"name": "",
"number": "",
"offline": {
"picture": "",
"soundtrack": "",
"mode": ""
},
"startTime": "",
"stealth": false,
"transcoding": {
"targetResolution": "",
"videoBitrate": "",
"videoBufferSize": ""
},
"watermark": {
"url": "",
"enabled": false,
"position": "",
"width": "",
"verticalMargin": "",
"horizontalMargin": "",
"duration": "",
"fixedSize": false,
"animated": false,
"opacity": 0,
"fadeConfig": [
{
"programType": "",
"periodMins": "",
"leadingEdge": false
}
]
},
"onDemand": {
"enabled": false
},
"streamMode": "",
"transcodeConfigId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/channels' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"disableFillerOverlay": false,
"duration": "",
"fillerCollections": [
{
"id": "",
"weight": "",
"cooldownSeconds": ""
}
],
"fillerRepeatCooldown": "",
"groupTitle": "",
"guideFlexTitle": "",
"guideMinimumDuration": "",
"icon": {
"path": "",
"width": "",
"duration": "",
"position": ""
},
"id": "",
"name": "",
"number": "",
"offline": {
"picture": "",
"soundtrack": "",
"mode": ""
},
"startTime": "",
"stealth": false,
"transcoding": {
"targetResolution": "",
"videoBitrate": "",
"videoBufferSize": ""
},
"watermark": {
"url": "",
"enabled": false,
"position": "",
"width": "",
"verticalMargin": "",
"horizontalMargin": "",
"duration": "",
"fixedSize": false,
"animated": false,
"opacity": 0,
"fadeConfig": [
{
"programType": "",
"periodMins": "",
"leadingEdge": false
}
]
},
"onDemand": {
"enabled": false
},
"streamMode": "",
"transcodeConfigId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/channels", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/channels"
payload = {
"disableFillerOverlay": False,
"duration": "",
"fillerCollections": [
{
"id": "",
"weight": "",
"cooldownSeconds": ""
}
],
"fillerRepeatCooldown": "",
"groupTitle": "",
"guideFlexTitle": "",
"guideMinimumDuration": "",
"icon": {
"path": "",
"width": "",
"duration": "",
"position": ""
},
"id": "",
"name": "",
"number": "",
"offline": {
"picture": "",
"soundtrack": "",
"mode": ""
},
"startTime": "",
"stealth": False,
"transcoding": {
"targetResolution": "",
"videoBitrate": "",
"videoBufferSize": ""
},
"watermark": {
"url": "",
"enabled": False,
"position": "",
"width": "",
"verticalMargin": "",
"horizontalMargin": "",
"duration": "",
"fixedSize": False,
"animated": False,
"opacity": 0,
"fadeConfig": [
{
"programType": "",
"periodMins": "",
"leadingEdge": False
}
]
},
"onDemand": { "enabled": False },
"streamMode": "",
"transcodeConfigId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/channels"
payload <- "{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/channels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\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/api/channels') do |req|
req.body = "{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/channels";
let payload = json!({
"disableFillerOverlay": false,
"duration": "",
"fillerCollections": (
json!({
"id": "",
"weight": "",
"cooldownSeconds": ""
})
),
"fillerRepeatCooldown": "",
"groupTitle": "",
"guideFlexTitle": "",
"guideMinimumDuration": "",
"icon": json!({
"path": "",
"width": "",
"duration": "",
"position": ""
}),
"id": "",
"name": "",
"number": "",
"offline": json!({
"picture": "",
"soundtrack": "",
"mode": ""
}),
"startTime": "",
"stealth": false,
"transcoding": json!({
"targetResolution": "",
"videoBitrate": "",
"videoBufferSize": ""
}),
"watermark": json!({
"url": "",
"enabled": false,
"position": "",
"width": "",
"verticalMargin": "",
"horizontalMargin": "",
"duration": "",
"fixedSize": false,
"animated": false,
"opacity": 0,
"fadeConfig": (
json!({
"programType": "",
"periodMins": "",
"leadingEdge": false
})
)
}),
"onDemand": json!({"enabled": false}),
"streamMode": "",
"transcodeConfigId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/api/channels \
--header 'content-type: application/json' \
--data '{
"disableFillerOverlay": false,
"duration": "",
"fillerCollections": [
{
"id": "",
"weight": "",
"cooldownSeconds": ""
}
],
"fillerRepeatCooldown": "",
"groupTitle": "",
"guideFlexTitle": "",
"guideMinimumDuration": "",
"icon": {
"path": "",
"width": "",
"duration": "",
"position": ""
},
"id": "",
"name": "",
"number": "",
"offline": {
"picture": "",
"soundtrack": "",
"mode": ""
},
"startTime": "",
"stealth": false,
"transcoding": {
"targetResolution": "",
"videoBitrate": "",
"videoBufferSize": ""
},
"watermark": {
"url": "",
"enabled": false,
"position": "",
"width": "",
"verticalMargin": "",
"horizontalMargin": "",
"duration": "",
"fixedSize": false,
"animated": false,
"opacity": 0,
"fadeConfig": [
{
"programType": "",
"periodMins": "",
"leadingEdge": false
}
]
},
"onDemand": {
"enabled": false
},
"streamMode": "",
"transcodeConfigId": ""
}'
echo '{
"disableFillerOverlay": false,
"duration": "",
"fillerCollections": [
{
"id": "",
"weight": "",
"cooldownSeconds": ""
}
],
"fillerRepeatCooldown": "",
"groupTitle": "",
"guideFlexTitle": "",
"guideMinimumDuration": "",
"icon": {
"path": "",
"width": "",
"duration": "",
"position": ""
},
"id": "",
"name": "",
"number": "",
"offline": {
"picture": "",
"soundtrack": "",
"mode": ""
},
"startTime": "",
"stealth": false,
"transcoding": {
"targetResolution": "",
"videoBitrate": "",
"videoBufferSize": ""
},
"watermark": {
"url": "",
"enabled": false,
"position": "",
"width": "",
"verticalMargin": "",
"horizontalMargin": "",
"duration": "",
"fixedSize": false,
"animated": false,
"opacity": 0,
"fadeConfig": [
{
"programType": "",
"periodMins": "",
"leadingEdge": false
}
]
},
"onDemand": {
"enabled": false
},
"streamMode": "",
"transcodeConfigId": ""
}' | \
http POST {{baseUrl}}/api/channels \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "disableFillerOverlay": false,\n "duration": "",\n "fillerCollections": [\n {\n "id": "",\n "weight": "",\n "cooldownSeconds": ""\n }\n ],\n "fillerRepeatCooldown": "",\n "groupTitle": "",\n "guideFlexTitle": "",\n "guideMinimumDuration": "",\n "icon": {\n "path": "",\n "width": "",\n "duration": "",\n "position": ""\n },\n "id": "",\n "name": "",\n "number": "",\n "offline": {\n "picture": "",\n "soundtrack": "",\n "mode": ""\n },\n "startTime": "",\n "stealth": false,\n "transcoding": {\n "targetResolution": "",\n "videoBitrate": "",\n "videoBufferSize": ""\n },\n "watermark": {\n "url": "",\n "enabled": false,\n "position": "",\n "width": "",\n "verticalMargin": "",\n "horizontalMargin": "",\n "duration": "",\n "fixedSize": false,\n "animated": false,\n "opacity": 0,\n "fadeConfig": [\n {\n "programType": "",\n "periodMins": "",\n "leadingEdge": false\n }\n ]\n },\n "onDemand": {\n "enabled": false\n },\n "streamMode": "",\n "transcodeConfigId": ""\n}' \
--output-document \
- {{baseUrl}}/api/channels
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"disableFillerOverlay": false,
"duration": "",
"fillerCollections": [
[
"id": "",
"weight": "",
"cooldownSeconds": ""
]
],
"fillerRepeatCooldown": "",
"groupTitle": "",
"guideFlexTitle": "",
"guideMinimumDuration": "",
"icon": [
"path": "",
"width": "",
"duration": "",
"position": ""
],
"id": "",
"name": "",
"number": "",
"offline": [
"picture": "",
"soundtrack": "",
"mode": ""
],
"startTime": "",
"stealth": false,
"transcoding": [
"targetResolution": "",
"videoBitrate": "",
"videoBufferSize": ""
],
"watermark": [
"url": "",
"enabled": false,
"position": "",
"width": "",
"verticalMargin": "",
"horizontalMargin": "",
"duration": "",
"fixedSize": false,
"animated": false,
"opacity": 0,
"fadeConfig": [
[
"programType": "",
"periodMins": "",
"leadingEdge": false
]
]
],
"onDemand": ["enabled": false],
"streamMode": "",
"transcodeConfigId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/channels")! 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()
DELETE
delete -api-channels--id
{{baseUrl}}/api/channels/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/channels/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/api/channels/:id")
require "http/client"
url = "{{baseUrl}}/api/channels/:id"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/api/channels/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/channels/:id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/channels/:id"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/api/channels/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/api/channels/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/channels/:id"))
.method("DELETE", 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}}/api/channels/:id")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/api/channels/:id")
.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('DELETE', '{{baseUrl}}/api/channels/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/api/channels/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/channels/:id';
const options = {method: 'DELETE'};
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}}/api/channels/:id',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/channels/:id")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/channels/:id',
headers: {}
};
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: 'DELETE', url: '{{baseUrl}}/api/channels/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/api/channels/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/api/channels/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/channels/:id';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/channels/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
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}}/api/channels/:id" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/channels/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/api/channels/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/channels/:id');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/channels/:id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/channels/:id' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/channels/:id' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/api/channels/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/channels/:id"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/channels/:id"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/channels/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/api/channels/:id') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/channels/:id";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/api/channels/:id
http DELETE {{baseUrl}}/api/channels/:id
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/api/channels/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/channels/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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
get -api-channels--id-lineup
{{baseUrl}}/api/channels/:id/lineup
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/channels/:id/lineup");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/channels/:id/lineup")
require "http/client"
url = "{{baseUrl}}/api/channels/:id/lineup"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/channels/:id/lineup"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/channels/:id/lineup");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/channels/:id/lineup"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/channels/:id/lineup HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/channels/:id/lineup")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/channels/:id/lineup"))
.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}}/api/channels/:id/lineup")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/channels/:id/lineup")
.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}}/api/channels/:id/lineup');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/channels/:id/lineup'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/channels/:id/lineup';
const options = {method: 'GET'};
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}}/api/channels/:id/lineup',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/channels/:id/lineup")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/channels/:id/lineup',
headers: {}
};
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}}/api/channels/:id/lineup'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/channels/:id/lineup');
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}}/api/channels/:id/lineup'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/channels/:id/lineup';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/channels/:id/lineup"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/channels/:id/lineup" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/channels/:id/lineup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/channels/:id/lineup');
echo $response->getBody();
setUrl('{{baseUrl}}/api/channels/:id/lineup');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/channels/:id/lineup');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/channels/:id/lineup' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/channels/:id/lineup' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/channels/:id/lineup")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/channels/:id/lineup"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/channels/:id/lineup"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/channels/:id/lineup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/channels/:id/lineup') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/channels/:id/lineup";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/channels/:id/lineup
http GET {{baseUrl}}/api/channels/:id/lineup
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/channels/:id/lineup
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/channels/:id/lineup")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-channels--id-programming
{{baseUrl}}/api/channels/:id/programming
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/channels/:id/programming");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/channels/:id/programming")
require "http/client"
url = "{{baseUrl}}/api/channels/:id/programming"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/channels/:id/programming"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/channels/:id/programming");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/channels/:id/programming"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/channels/:id/programming HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/channels/:id/programming")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/channels/:id/programming"))
.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}}/api/channels/:id/programming")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/channels/:id/programming")
.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}}/api/channels/:id/programming');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/channels/:id/programming'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/channels/:id/programming';
const options = {method: 'GET'};
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}}/api/channels/:id/programming',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/channels/:id/programming")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/channels/:id/programming',
headers: {}
};
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}}/api/channels/:id/programming'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/channels/:id/programming');
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}}/api/channels/:id/programming'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/channels/:id/programming';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/channels/:id/programming"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/channels/:id/programming" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/channels/:id/programming",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/channels/:id/programming');
echo $response->getBody();
setUrl('{{baseUrl}}/api/channels/:id/programming');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/channels/:id/programming');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/channels/:id/programming' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/channels/:id/programming' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/channels/:id/programming")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/channels/:id/programming"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/channels/:id/programming"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/channels/:id/programming")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/channels/:id/programming') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/channels/:id/programming";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/channels/:id/programming
http GET {{baseUrl}}/api/channels/:id/programming
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/channels/:id/programming
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/channels/:id/programming")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-channels--id-programs
{{baseUrl}}/api/channels/:id/programs
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/channels/:id/programs");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/channels/:id/programs")
require "http/client"
url = "{{baseUrl}}/api/channels/:id/programs"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/channels/:id/programs"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/channels/:id/programs");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/channels/:id/programs"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/channels/:id/programs HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/channels/:id/programs")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/channels/:id/programs"))
.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}}/api/channels/:id/programs")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/channels/:id/programs")
.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}}/api/channels/:id/programs');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/channels/:id/programs'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/channels/:id/programs';
const options = {method: 'GET'};
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}}/api/channels/:id/programs',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/channels/:id/programs")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/channels/:id/programs',
headers: {}
};
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}}/api/channels/:id/programs'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/channels/:id/programs');
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}}/api/channels/:id/programs'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/channels/:id/programs';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/channels/:id/programs"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/channels/:id/programs" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/channels/:id/programs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/channels/:id/programs');
echo $response->getBody();
setUrl('{{baseUrl}}/api/channels/:id/programs');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/channels/:id/programs');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/channels/:id/programs' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/channels/:id/programs' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/channels/:id/programs")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/channels/:id/programs"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/channels/:id/programs"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/channels/:id/programs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/channels/:id/programs') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/channels/:id/programs";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/channels/:id/programs
http GET {{baseUrl}}/api/channels/:id/programs
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/channels/:id/programs
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/channels/:id/programs")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-channels-all-lineups
{{baseUrl}}/api/channels/all/lineups
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/channels/all/lineups");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/channels/all/lineups")
require "http/client"
url = "{{baseUrl}}/api/channels/all/lineups"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/channels/all/lineups"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/channels/all/lineups");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/channels/all/lineups"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/channels/all/lineups HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/channels/all/lineups")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/channels/all/lineups"))
.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}}/api/channels/all/lineups")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/channels/all/lineups")
.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}}/api/channels/all/lineups');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/channels/all/lineups'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/channels/all/lineups';
const options = {method: 'GET'};
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}}/api/channels/all/lineups',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/channels/all/lineups")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/channels/all/lineups',
headers: {}
};
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}}/api/channels/all/lineups'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/channels/all/lineups');
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}}/api/channels/all/lineups'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/channels/all/lineups';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/channels/all/lineups"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/channels/all/lineups" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/channels/all/lineups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/channels/all/lineups');
echo $response->getBody();
setUrl('{{baseUrl}}/api/channels/all/lineups');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/channels/all/lineups');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/channels/all/lineups' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/channels/all/lineups' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/channels/all/lineups")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/channels/all/lineups"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/channels/all/lineups"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/channels/all/lineups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/channels/all/lineups') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/channels/all/lineups";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/channels/all/lineups
http GET {{baseUrl}}/api/channels/all/lineups
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/channels/all/lineups
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/channels/all/lineups")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-debug-helpers-build_guide
{{baseUrl}}/api/debug/helpers/build_guide
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/debug/helpers/build_guide");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/debug/helpers/build_guide")
require "http/client"
url = "{{baseUrl}}/api/debug/helpers/build_guide"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/debug/helpers/build_guide"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/debug/helpers/build_guide");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/debug/helpers/build_guide"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/debug/helpers/build_guide HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/debug/helpers/build_guide")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/debug/helpers/build_guide"))
.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}}/api/debug/helpers/build_guide")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/debug/helpers/build_guide")
.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}}/api/debug/helpers/build_guide');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/debug/helpers/build_guide'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/debug/helpers/build_guide';
const options = {method: 'GET'};
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}}/api/debug/helpers/build_guide',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/debug/helpers/build_guide")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/debug/helpers/build_guide',
headers: {}
};
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}}/api/debug/helpers/build_guide'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/debug/helpers/build_guide');
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}}/api/debug/helpers/build_guide'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/debug/helpers/build_guide';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/debug/helpers/build_guide"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/debug/helpers/build_guide" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/debug/helpers/build_guide",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/debug/helpers/build_guide');
echo $response->getBody();
setUrl('{{baseUrl}}/api/debug/helpers/build_guide');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/debug/helpers/build_guide');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/debug/helpers/build_guide' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/debug/helpers/build_guide' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/debug/helpers/build_guide")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/debug/helpers/build_guide"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/debug/helpers/build_guide"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/debug/helpers/build_guide")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/debug/helpers/build_guide') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/debug/helpers/build_guide";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/debug/helpers/build_guide
http GET {{baseUrl}}/api/debug/helpers/build_guide
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/debug/helpers/build_guide
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/debug/helpers/build_guide")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
getChannels
{{baseUrl}}/api/channels
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/channels");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/channels")
require "http/client"
url = "{{baseUrl}}/api/channels"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/channels"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/channels");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/channels"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/channels HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/channels")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/channels"))
.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}}/api/channels")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/channels")
.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}}/api/channels');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/channels'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/channels';
const options = {method: 'GET'};
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}}/api/channels',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/channels")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/channels',
headers: {}
};
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}}/api/channels'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/channels');
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}}/api/channels'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/channels';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/channels"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/channels" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/channels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/channels');
echo $response->getBody();
setUrl('{{baseUrl}}/api/channels');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/channels');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/channels' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/channels' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/channels")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/channels"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/channels"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/channels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/channels') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/channels";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/channels
http GET {{baseUrl}}/api/channels
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/channels
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/channels")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
getChannelsByNumberV2
{{baseUrl}}/api/channels/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/channels/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/channels/:id")
require "http/client"
url = "{{baseUrl}}/api/channels/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/channels/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/channels/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/channels/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/channels/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/channels/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/channels/:id"))
.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}}/api/channels/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/channels/:id")
.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}}/api/channels/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/channels/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/channels/:id';
const options = {method: 'GET'};
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}}/api/channels/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/channels/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/channels/:id',
headers: {}
};
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}}/api/channels/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/channels/:id');
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}}/api/channels/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/channels/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/channels/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/channels/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/channels/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/channels/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/channels/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/channels/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/channels/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/channels/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/channels/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/channels/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/channels/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/channels/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/channels/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/channels/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/channels/:id
http GET {{baseUrl}}/api/channels/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/channels/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/channels/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
post -api-channels--id-programming
{{baseUrl}}/api/channels/:id/programming
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/channels/:id/programming");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/channels/:id/programming")
require "http/client"
url = "{{baseUrl}}/api/channels/:id/programming"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/api/channels/:id/programming"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/channels/:id/programming");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/channels/:id/programming"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/api/channels/:id/programming HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/channels/:id/programming")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/channels/:id/programming"))
.method("POST", 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}}/api/channels/:id/programming")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/channels/:id/programming")
.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('POST', '{{baseUrl}}/api/channels/:id/programming');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/channels/:id/programming'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/channels/:id/programming';
const options = {method: 'POST'};
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}}/api/channels/:id/programming',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/channels/:id/programming")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/channels/:id/programming',
headers: {}
};
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: 'POST',
url: '{{baseUrl}}/api/channels/:id/programming'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/api/channels/:id/programming');
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}}/api/channels/:id/programming'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/channels/:id/programming';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/channels/:id/programming"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/channels/:id/programming" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/channels/:id/programming",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/channels/:id/programming');
echo $response->getBody();
setUrl('{{baseUrl}}/api/channels/:id/programming');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/channels/:id/programming');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/channels/:id/programming' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/channels/:id/programming' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/api/channels/:id/programming")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/channels/:id/programming"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/channels/:id/programming"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/channels/:id/programming")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/api/channels/:id/programming') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/channels/:id/programming";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/api/channels/:id/programming
http POST {{baseUrl}}/api/channels/:id/programming
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/api/channels/:id/programming
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/channels/:id/programming")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
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
post -api-channels-schedule-time-slots
{{baseUrl}}/api/channels/schedule-time-slots
BODY json
{
"schedule": {
"type": "",
"flexPreference": "",
"latenessMs": "",
"maxDays": "",
"padMs": "",
"period": "",
"slots": [
{
"order": "",
"direction": "",
"programming": "",
"startTime": ""
}
],
"timeZoneOffset": "",
"startTomorrow": false
},
"programs": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/channels/schedule-time-slots");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"schedule\": {\n \"type\": \"\",\n \"flexPreference\": \"\",\n \"latenessMs\": \"\",\n \"maxDays\": \"\",\n \"padMs\": \"\",\n \"period\": \"\",\n \"slots\": [\n {\n \"order\": \"\",\n \"direction\": \"\",\n \"programming\": \"\",\n \"startTime\": \"\"\n }\n ],\n \"timeZoneOffset\": \"\",\n \"startTomorrow\": false\n },\n \"programs\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/channels/schedule-time-slots" {:content-type :json
:form-params {:schedule {:type ""
:flexPreference ""
:latenessMs ""
:maxDays ""
:padMs ""
:period ""
:slots [{:order ""
:direction ""
:programming ""
:startTime ""}]
:timeZoneOffset ""
:startTomorrow false}
:programs []}})
require "http/client"
url = "{{baseUrl}}/api/channels/schedule-time-slots"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"schedule\": {\n \"type\": \"\",\n \"flexPreference\": \"\",\n \"latenessMs\": \"\",\n \"maxDays\": \"\",\n \"padMs\": \"\",\n \"period\": \"\",\n \"slots\": [\n {\n \"order\": \"\",\n \"direction\": \"\",\n \"programming\": \"\",\n \"startTime\": \"\"\n }\n ],\n \"timeZoneOffset\": \"\",\n \"startTomorrow\": false\n },\n \"programs\": []\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}}/api/channels/schedule-time-slots"),
Content = new StringContent("{\n \"schedule\": {\n \"type\": \"\",\n \"flexPreference\": \"\",\n \"latenessMs\": \"\",\n \"maxDays\": \"\",\n \"padMs\": \"\",\n \"period\": \"\",\n \"slots\": [\n {\n \"order\": \"\",\n \"direction\": \"\",\n \"programming\": \"\",\n \"startTime\": \"\"\n }\n ],\n \"timeZoneOffset\": \"\",\n \"startTomorrow\": false\n },\n \"programs\": []\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}}/api/channels/schedule-time-slots");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"schedule\": {\n \"type\": \"\",\n \"flexPreference\": \"\",\n \"latenessMs\": \"\",\n \"maxDays\": \"\",\n \"padMs\": \"\",\n \"period\": \"\",\n \"slots\": [\n {\n \"order\": \"\",\n \"direction\": \"\",\n \"programming\": \"\",\n \"startTime\": \"\"\n }\n ],\n \"timeZoneOffset\": \"\",\n \"startTomorrow\": false\n },\n \"programs\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/channels/schedule-time-slots"
payload := strings.NewReader("{\n \"schedule\": {\n \"type\": \"\",\n \"flexPreference\": \"\",\n \"latenessMs\": \"\",\n \"maxDays\": \"\",\n \"padMs\": \"\",\n \"period\": \"\",\n \"slots\": [\n {\n \"order\": \"\",\n \"direction\": \"\",\n \"programming\": \"\",\n \"startTime\": \"\"\n }\n ],\n \"timeZoneOffset\": \"\",\n \"startTomorrow\": false\n },\n \"programs\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
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/api/channels/schedule-time-slots HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 347
{
"schedule": {
"type": "",
"flexPreference": "",
"latenessMs": "",
"maxDays": "",
"padMs": "",
"period": "",
"slots": [
{
"order": "",
"direction": "",
"programming": "",
"startTime": ""
}
],
"timeZoneOffset": "",
"startTomorrow": false
},
"programs": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/channels/schedule-time-slots")
.setHeader("content-type", "application/json")
.setBody("{\n \"schedule\": {\n \"type\": \"\",\n \"flexPreference\": \"\",\n \"latenessMs\": \"\",\n \"maxDays\": \"\",\n \"padMs\": \"\",\n \"period\": \"\",\n \"slots\": [\n {\n \"order\": \"\",\n \"direction\": \"\",\n \"programming\": \"\",\n \"startTime\": \"\"\n }\n ],\n \"timeZoneOffset\": \"\",\n \"startTomorrow\": false\n },\n \"programs\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/channels/schedule-time-slots"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"schedule\": {\n \"type\": \"\",\n \"flexPreference\": \"\",\n \"latenessMs\": \"\",\n \"maxDays\": \"\",\n \"padMs\": \"\",\n \"period\": \"\",\n \"slots\": [\n {\n \"order\": \"\",\n \"direction\": \"\",\n \"programming\": \"\",\n \"startTime\": \"\"\n }\n ],\n \"timeZoneOffset\": \"\",\n \"startTomorrow\": false\n },\n \"programs\": []\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 \"schedule\": {\n \"type\": \"\",\n \"flexPreference\": \"\",\n \"latenessMs\": \"\",\n \"maxDays\": \"\",\n \"padMs\": \"\",\n \"period\": \"\",\n \"slots\": [\n {\n \"order\": \"\",\n \"direction\": \"\",\n \"programming\": \"\",\n \"startTime\": \"\"\n }\n ],\n \"timeZoneOffset\": \"\",\n \"startTomorrow\": false\n },\n \"programs\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/channels/schedule-time-slots")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/channels/schedule-time-slots")
.header("content-type", "application/json")
.body("{\n \"schedule\": {\n \"type\": \"\",\n \"flexPreference\": \"\",\n \"latenessMs\": \"\",\n \"maxDays\": \"\",\n \"padMs\": \"\",\n \"period\": \"\",\n \"slots\": [\n {\n \"order\": \"\",\n \"direction\": \"\",\n \"programming\": \"\",\n \"startTime\": \"\"\n }\n ],\n \"timeZoneOffset\": \"\",\n \"startTomorrow\": false\n },\n \"programs\": []\n}")
.asString();
const data = JSON.stringify({
schedule: {
type: '',
flexPreference: '',
latenessMs: '',
maxDays: '',
padMs: '',
period: '',
slots: [
{
order: '',
direction: '',
programming: '',
startTime: ''
}
],
timeZoneOffset: '',
startTomorrow: false
},
programs: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/channels/schedule-time-slots');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/channels/schedule-time-slots',
headers: {'content-type': 'application/json'},
data: {
schedule: {
type: '',
flexPreference: '',
latenessMs: '',
maxDays: '',
padMs: '',
period: '',
slots: [{order: '', direction: '', programming: '', startTime: ''}],
timeZoneOffset: '',
startTomorrow: false
},
programs: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/channels/schedule-time-slots';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"schedule":{"type":"","flexPreference":"","latenessMs":"","maxDays":"","padMs":"","period":"","slots":[{"order":"","direction":"","programming":"","startTime":""}],"timeZoneOffset":"","startTomorrow":false},"programs":[]}'
};
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}}/api/channels/schedule-time-slots',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "schedule": {\n "type": "",\n "flexPreference": "",\n "latenessMs": "",\n "maxDays": "",\n "padMs": "",\n "period": "",\n "slots": [\n {\n "order": "",\n "direction": "",\n "programming": "",\n "startTime": ""\n }\n ],\n "timeZoneOffset": "",\n "startTomorrow": false\n },\n "programs": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"schedule\": {\n \"type\": \"\",\n \"flexPreference\": \"\",\n \"latenessMs\": \"\",\n \"maxDays\": \"\",\n \"padMs\": \"\",\n \"period\": \"\",\n \"slots\": [\n {\n \"order\": \"\",\n \"direction\": \"\",\n \"programming\": \"\",\n \"startTime\": \"\"\n }\n ],\n \"timeZoneOffset\": \"\",\n \"startTomorrow\": false\n },\n \"programs\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/channels/schedule-time-slots")
.post(body)
.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/api/channels/schedule-time-slots',
headers: {
'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({
schedule: {
type: '',
flexPreference: '',
latenessMs: '',
maxDays: '',
padMs: '',
period: '',
slots: [{order: '', direction: '', programming: '', startTime: ''}],
timeZoneOffset: '',
startTomorrow: false
},
programs: []
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/channels/schedule-time-slots',
headers: {'content-type': 'application/json'},
body: {
schedule: {
type: '',
flexPreference: '',
latenessMs: '',
maxDays: '',
padMs: '',
period: '',
slots: [{order: '', direction: '', programming: '', startTime: ''}],
timeZoneOffset: '',
startTomorrow: false
},
programs: []
},
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}}/api/channels/schedule-time-slots');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
schedule: {
type: '',
flexPreference: '',
latenessMs: '',
maxDays: '',
padMs: '',
period: '',
slots: [
{
order: '',
direction: '',
programming: '',
startTime: ''
}
],
timeZoneOffset: '',
startTomorrow: false
},
programs: []
});
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}}/api/channels/schedule-time-slots',
headers: {'content-type': 'application/json'},
data: {
schedule: {
type: '',
flexPreference: '',
latenessMs: '',
maxDays: '',
padMs: '',
period: '',
slots: [{order: '', direction: '', programming: '', startTime: ''}],
timeZoneOffset: '',
startTomorrow: false
},
programs: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/channels/schedule-time-slots';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"schedule":{"type":"","flexPreference":"","latenessMs":"","maxDays":"","padMs":"","period":"","slots":[{"order":"","direction":"","programming":"","startTime":""}],"timeZoneOffset":"","startTomorrow":false},"programs":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"schedule": @{ @"type": @"", @"flexPreference": @"", @"latenessMs": @"", @"maxDays": @"", @"padMs": @"", @"period": @"", @"slots": @[ @{ @"order": @"", @"direction": @"", @"programming": @"", @"startTime": @"" } ], @"timeZoneOffset": @"", @"startTomorrow": @NO },
@"programs": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/channels/schedule-time-slots"]
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}}/api/channels/schedule-time-slots" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"schedule\": {\n \"type\": \"\",\n \"flexPreference\": \"\",\n \"latenessMs\": \"\",\n \"maxDays\": \"\",\n \"padMs\": \"\",\n \"period\": \"\",\n \"slots\": [\n {\n \"order\": \"\",\n \"direction\": \"\",\n \"programming\": \"\",\n \"startTime\": \"\"\n }\n ],\n \"timeZoneOffset\": \"\",\n \"startTomorrow\": false\n },\n \"programs\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/channels/schedule-time-slots",
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([
'schedule' => [
'type' => '',
'flexPreference' => '',
'latenessMs' => '',
'maxDays' => '',
'padMs' => '',
'period' => '',
'slots' => [
[
'order' => '',
'direction' => '',
'programming' => '',
'startTime' => ''
]
],
'timeZoneOffset' => '',
'startTomorrow' => null
],
'programs' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/channels/schedule-time-slots', [
'body' => '{
"schedule": {
"type": "",
"flexPreference": "",
"latenessMs": "",
"maxDays": "",
"padMs": "",
"period": "",
"slots": [
{
"order": "",
"direction": "",
"programming": "",
"startTime": ""
}
],
"timeZoneOffset": "",
"startTomorrow": false
},
"programs": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/channels/schedule-time-slots');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'schedule' => [
'type' => '',
'flexPreference' => '',
'latenessMs' => '',
'maxDays' => '',
'padMs' => '',
'period' => '',
'slots' => [
[
'order' => '',
'direction' => '',
'programming' => '',
'startTime' => ''
]
],
'timeZoneOffset' => '',
'startTomorrow' => null
],
'programs' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'schedule' => [
'type' => '',
'flexPreference' => '',
'latenessMs' => '',
'maxDays' => '',
'padMs' => '',
'period' => '',
'slots' => [
[
'order' => '',
'direction' => '',
'programming' => '',
'startTime' => ''
]
],
'timeZoneOffset' => '',
'startTomorrow' => null
],
'programs' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/api/channels/schedule-time-slots');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/channels/schedule-time-slots' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"schedule": {
"type": "",
"flexPreference": "",
"latenessMs": "",
"maxDays": "",
"padMs": "",
"period": "",
"slots": [
{
"order": "",
"direction": "",
"programming": "",
"startTime": ""
}
],
"timeZoneOffset": "",
"startTomorrow": false
},
"programs": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/channels/schedule-time-slots' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"schedule": {
"type": "",
"flexPreference": "",
"latenessMs": "",
"maxDays": "",
"padMs": "",
"period": "",
"slots": [
{
"order": "",
"direction": "",
"programming": "",
"startTime": ""
}
],
"timeZoneOffset": "",
"startTomorrow": false
},
"programs": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"schedule\": {\n \"type\": \"\",\n \"flexPreference\": \"\",\n \"latenessMs\": \"\",\n \"maxDays\": \"\",\n \"padMs\": \"\",\n \"period\": \"\",\n \"slots\": [\n {\n \"order\": \"\",\n \"direction\": \"\",\n \"programming\": \"\",\n \"startTime\": \"\"\n }\n ],\n \"timeZoneOffset\": \"\",\n \"startTomorrow\": false\n },\n \"programs\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/channels/schedule-time-slots", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/channels/schedule-time-slots"
payload = {
"schedule": {
"type": "",
"flexPreference": "",
"latenessMs": "",
"maxDays": "",
"padMs": "",
"period": "",
"slots": [
{
"order": "",
"direction": "",
"programming": "",
"startTime": ""
}
],
"timeZoneOffset": "",
"startTomorrow": False
},
"programs": []
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/channels/schedule-time-slots"
payload <- "{\n \"schedule\": {\n \"type\": \"\",\n \"flexPreference\": \"\",\n \"latenessMs\": \"\",\n \"maxDays\": \"\",\n \"padMs\": \"\",\n \"period\": \"\",\n \"slots\": [\n {\n \"order\": \"\",\n \"direction\": \"\",\n \"programming\": \"\",\n \"startTime\": \"\"\n }\n ],\n \"timeZoneOffset\": \"\",\n \"startTomorrow\": false\n },\n \"programs\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/channels/schedule-time-slots")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"schedule\": {\n \"type\": \"\",\n \"flexPreference\": \"\",\n \"latenessMs\": \"\",\n \"maxDays\": \"\",\n \"padMs\": \"\",\n \"period\": \"\",\n \"slots\": [\n {\n \"order\": \"\",\n \"direction\": \"\",\n \"programming\": \"\",\n \"startTime\": \"\"\n }\n ],\n \"timeZoneOffset\": \"\",\n \"startTomorrow\": false\n },\n \"programs\": []\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/api/channels/schedule-time-slots') do |req|
req.body = "{\n \"schedule\": {\n \"type\": \"\",\n \"flexPreference\": \"\",\n \"latenessMs\": \"\",\n \"maxDays\": \"\",\n \"padMs\": \"\",\n \"period\": \"\",\n \"slots\": [\n {\n \"order\": \"\",\n \"direction\": \"\",\n \"programming\": \"\",\n \"startTime\": \"\"\n }\n ],\n \"timeZoneOffset\": \"\",\n \"startTomorrow\": false\n },\n \"programs\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/channels/schedule-time-slots";
let payload = json!({
"schedule": json!({
"type": "",
"flexPreference": "",
"latenessMs": "",
"maxDays": "",
"padMs": "",
"period": "",
"slots": (
json!({
"order": "",
"direction": "",
"programming": "",
"startTime": ""
})
),
"timeZoneOffset": "",
"startTomorrow": false
}),
"programs": ()
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/api/channels/schedule-time-slots \
--header 'content-type: application/json' \
--data '{
"schedule": {
"type": "",
"flexPreference": "",
"latenessMs": "",
"maxDays": "",
"padMs": "",
"period": "",
"slots": [
{
"order": "",
"direction": "",
"programming": "",
"startTime": ""
}
],
"timeZoneOffset": "",
"startTomorrow": false
},
"programs": []
}'
echo '{
"schedule": {
"type": "",
"flexPreference": "",
"latenessMs": "",
"maxDays": "",
"padMs": "",
"period": "",
"slots": [
{
"order": "",
"direction": "",
"programming": "",
"startTime": ""
}
],
"timeZoneOffset": "",
"startTomorrow": false
},
"programs": []
}' | \
http POST {{baseUrl}}/api/channels/schedule-time-slots \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "schedule": {\n "type": "",\n "flexPreference": "",\n "latenessMs": "",\n "maxDays": "",\n "padMs": "",\n "period": "",\n "slots": [\n {\n "order": "",\n "direction": "",\n "programming": "",\n "startTime": ""\n }\n ],\n "timeZoneOffset": "",\n "startTomorrow": false\n },\n "programs": []\n}' \
--output-document \
- {{baseUrl}}/api/channels/schedule-time-slots
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"schedule": [
"type": "",
"flexPreference": "",
"latenessMs": "",
"maxDays": "",
"padMs": "",
"period": "",
"slots": [
[
"order": "",
"direction": "",
"programming": "",
"startTime": ""
]
],
"timeZoneOffset": "",
"startTomorrow": false
],
"programs": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/channels/schedule-time-slots")! 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()
PUT
put -api-channels--id
{{baseUrl}}/api/channels/:id
QUERY PARAMS
id
BODY json
{
"disableFillerOverlay": false,
"duration": "",
"fillerCollections": [
{
"id": "",
"weight": "",
"cooldownSeconds": ""
}
],
"fillerRepeatCooldown": "",
"groupTitle": "",
"guideFlexTitle": "",
"guideMinimumDuration": "",
"icon": {
"path": "",
"width": "",
"duration": "",
"position": ""
},
"id": "",
"name": "",
"number": "",
"offline": {
"picture": "",
"soundtrack": "",
"mode": ""
},
"startTime": "",
"stealth": false,
"transcoding": {
"targetResolution": "",
"videoBitrate": "",
"videoBufferSize": ""
},
"watermark": {
"url": "",
"enabled": false,
"position": "",
"width": "",
"verticalMargin": "",
"horizontalMargin": "",
"duration": "",
"fixedSize": false,
"animated": false,
"opacity": 0,
"fadeConfig": [
{
"programType": "",
"periodMins": "",
"leadingEdge": false
}
]
},
"onDemand": {
"enabled": false
},
"streamMode": "",
"transcodeConfigId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/channels/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/api/channels/:id" {:content-type :json
:form-params {:disableFillerOverlay false
:duration ""
:fillerCollections [{:id ""
:weight ""
:cooldownSeconds ""}]
:fillerRepeatCooldown ""
:groupTitle ""
:guideFlexTitle ""
:guideMinimumDuration ""
:icon {:path ""
:width ""
:duration ""
:position ""}
:id ""
:name ""
:number ""
:offline {:picture ""
:soundtrack ""
:mode ""}
:startTime ""
:stealth false
:transcoding {:targetResolution ""
:videoBitrate ""
:videoBufferSize ""}
:watermark {:url ""
:enabled false
:position ""
:width ""
:verticalMargin ""
:horizontalMargin ""
:duration ""
:fixedSize false
:animated false
:opacity 0
:fadeConfig [{:programType ""
:periodMins ""
:leadingEdge false}]}
:onDemand {:enabled false}
:streamMode ""
:transcodeConfigId ""}})
require "http/client"
url = "{{baseUrl}}/api/channels/:id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/api/channels/:id"),
Content = new StringContent("{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\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}}/api/channels/:id");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/channels/:id"
payload := strings.NewReader("{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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))
}
PUT /baseUrl/api/channels/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1059
{
"disableFillerOverlay": false,
"duration": "",
"fillerCollections": [
{
"id": "",
"weight": "",
"cooldownSeconds": ""
}
],
"fillerRepeatCooldown": "",
"groupTitle": "",
"guideFlexTitle": "",
"guideMinimumDuration": "",
"icon": {
"path": "",
"width": "",
"duration": "",
"position": ""
},
"id": "",
"name": "",
"number": "",
"offline": {
"picture": "",
"soundtrack": "",
"mode": ""
},
"startTime": "",
"stealth": false,
"transcoding": {
"targetResolution": "",
"videoBitrate": "",
"videoBufferSize": ""
},
"watermark": {
"url": "",
"enabled": false,
"position": "",
"width": "",
"verticalMargin": "",
"horizontalMargin": "",
"duration": "",
"fixedSize": false,
"animated": false,
"opacity": 0,
"fadeConfig": [
{
"programType": "",
"periodMins": "",
"leadingEdge": false
}
]
},
"onDemand": {
"enabled": false
},
"streamMode": "",
"transcodeConfigId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/api/channels/:id")
.setHeader("content-type", "application/json")
.setBody("{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/channels/:id"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\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 \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/channels/:id")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/api/channels/:id")
.header("content-type", "application/json")
.body("{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}")
.asString();
const data = JSON.stringify({
disableFillerOverlay: false,
duration: '',
fillerCollections: [
{
id: '',
weight: '',
cooldownSeconds: ''
}
],
fillerRepeatCooldown: '',
groupTitle: '',
guideFlexTitle: '',
guideMinimumDuration: '',
icon: {
path: '',
width: '',
duration: '',
position: ''
},
id: '',
name: '',
number: '',
offline: {
picture: '',
soundtrack: '',
mode: ''
},
startTime: '',
stealth: false,
transcoding: {
targetResolution: '',
videoBitrate: '',
videoBufferSize: ''
},
watermark: {
url: '',
enabled: false,
position: '',
width: '',
verticalMargin: '',
horizontalMargin: '',
duration: '',
fixedSize: false,
animated: false,
opacity: 0,
fadeConfig: [
{
programType: '',
periodMins: '',
leadingEdge: false
}
]
},
onDemand: {
enabled: false
},
streamMode: '',
transcodeConfigId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/api/channels/:id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/channels/:id',
headers: {'content-type': 'application/json'},
data: {
disableFillerOverlay: false,
duration: '',
fillerCollections: [{id: '', weight: '', cooldownSeconds: ''}],
fillerRepeatCooldown: '',
groupTitle: '',
guideFlexTitle: '',
guideMinimumDuration: '',
icon: {path: '', width: '', duration: '', position: ''},
id: '',
name: '',
number: '',
offline: {picture: '', soundtrack: '', mode: ''},
startTime: '',
stealth: false,
transcoding: {targetResolution: '', videoBitrate: '', videoBufferSize: ''},
watermark: {
url: '',
enabled: false,
position: '',
width: '',
verticalMargin: '',
horizontalMargin: '',
duration: '',
fixedSize: false,
animated: false,
opacity: 0,
fadeConfig: [{programType: '', periodMins: '', leadingEdge: false}]
},
onDemand: {enabled: false},
streamMode: '',
transcodeConfigId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/channels/:id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"disableFillerOverlay":false,"duration":"","fillerCollections":[{"id":"","weight":"","cooldownSeconds":""}],"fillerRepeatCooldown":"","groupTitle":"","guideFlexTitle":"","guideMinimumDuration":"","icon":{"path":"","width":"","duration":"","position":""},"id":"","name":"","number":"","offline":{"picture":"","soundtrack":"","mode":""},"startTime":"","stealth":false,"transcoding":{"targetResolution":"","videoBitrate":"","videoBufferSize":""},"watermark":{"url":"","enabled":false,"position":"","width":"","verticalMargin":"","horizontalMargin":"","duration":"","fixedSize":false,"animated":false,"opacity":0,"fadeConfig":[{"programType":"","periodMins":"","leadingEdge":false}]},"onDemand":{"enabled":false},"streamMode":"","transcodeConfigId":""}'
};
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}}/api/channels/:id',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "disableFillerOverlay": false,\n "duration": "",\n "fillerCollections": [\n {\n "id": "",\n "weight": "",\n "cooldownSeconds": ""\n }\n ],\n "fillerRepeatCooldown": "",\n "groupTitle": "",\n "guideFlexTitle": "",\n "guideMinimumDuration": "",\n "icon": {\n "path": "",\n "width": "",\n "duration": "",\n "position": ""\n },\n "id": "",\n "name": "",\n "number": "",\n "offline": {\n "picture": "",\n "soundtrack": "",\n "mode": ""\n },\n "startTime": "",\n "stealth": false,\n "transcoding": {\n "targetResolution": "",\n "videoBitrate": "",\n "videoBufferSize": ""\n },\n "watermark": {\n "url": "",\n "enabled": false,\n "position": "",\n "width": "",\n "verticalMargin": "",\n "horizontalMargin": "",\n "duration": "",\n "fixedSize": false,\n "animated": false,\n "opacity": 0,\n "fadeConfig": [\n {\n "programType": "",\n "periodMins": "",\n "leadingEdge": false\n }\n ]\n },\n "onDemand": {\n "enabled": false\n },\n "streamMode": "",\n "transcodeConfigId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/channels/:id")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/channels/:id',
headers: {
'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({
disableFillerOverlay: false,
duration: '',
fillerCollections: [{id: '', weight: '', cooldownSeconds: ''}],
fillerRepeatCooldown: '',
groupTitle: '',
guideFlexTitle: '',
guideMinimumDuration: '',
icon: {path: '', width: '', duration: '', position: ''},
id: '',
name: '',
number: '',
offline: {picture: '', soundtrack: '', mode: ''},
startTime: '',
stealth: false,
transcoding: {targetResolution: '', videoBitrate: '', videoBufferSize: ''},
watermark: {
url: '',
enabled: false,
position: '',
width: '',
verticalMargin: '',
horizontalMargin: '',
duration: '',
fixedSize: false,
animated: false,
opacity: 0,
fadeConfig: [{programType: '', periodMins: '', leadingEdge: false}]
},
onDemand: {enabled: false},
streamMode: '',
transcodeConfigId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/channels/:id',
headers: {'content-type': 'application/json'},
body: {
disableFillerOverlay: false,
duration: '',
fillerCollections: [{id: '', weight: '', cooldownSeconds: ''}],
fillerRepeatCooldown: '',
groupTitle: '',
guideFlexTitle: '',
guideMinimumDuration: '',
icon: {path: '', width: '', duration: '', position: ''},
id: '',
name: '',
number: '',
offline: {picture: '', soundtrack: '', mode: ''},
startTime: '',
stealth: false,
transcoding: {targetResolution: '', videoBitrate: '', videoBufferSize: ''},
watermark: {
url: '',
enabled: false,
position: '',
width: '',
verticalMargin: '',
horizontalMargin: '',
duration: '',
fixedSize: false,
animated: false,
opacity: 0,
fadeConfig: [{programType: '', periodMins: '', leadingEdge: false}]
},
onDemand: {enabled: false},
streamMode: '',
transcodeConfigId: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/api/channels/:id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
disableFillerOverlay: false,
duration: '',
fillerCollections: [
{
id: '',
weight: '',
cooldownSeconds: ''
}
],
fillerRepeatCooldown: '',
groupTitle: '',
guideFlexTitle: '',
guideMinimumDuration: '',
icon: {
path: '',
width: '',
duration: '',
position: ''
},
id: '',
name: '',
number: '',
offline: {
picture: '',
soundtrack: '',
mode: ''
},
startTime: '',
stealth: false,
transcoding: {
targetResolution: '',
videoBitrate: '',
videoBufferSize: ''
},
watermark: {
url: '',
enabled: false,
position: '',
width: '',
verticalMargin: '',
horizontalMargin: '',
duration: '',
fixedSize: false,
animated: false,
opacity: 0,
fadeConfig: [
{
programType: '',
periodMins: '',
leadingEdge: false
}
]
},
onDemand: {
enabled: false
},
streamMode: '',
transcodeConfigId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/channels/:id',
headers: {'content-type': 'application/json'},
data: {
disableFillerOverlay: false,
duration: '',
fillerCollections: [{id: '', weight: '', cooldownSeconds: ''}],
fillerRepeatCooldown: '',
groupTitle: '',
guideFlexTitle: '',
guideMinimumDuration: '',
icon: {path: '', width: '', duration: '', position: ''},
id: '',
name: '',
number: '',
offline: {picture: '', soundtrack: '', mode: ''},
startTime: '',
stealth: false,
transcoding: {targetResolution: '', videoBitrate: '', videoBufferSize: ''},
watermark: {
url: '',
enabled: false,
position: '',
width: '',
verticalMargin: '',
horizontalMargin: '',
duration: '',
fixedSize: false,
animated: false,
opacity: 0,
fadeConfig: [{programType: '', periodMins: '', leadingEdge: false}]
},
onDemand: {enabled: false},
streamMode: '',
transcodeConfigId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/channels/:id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"disableFillerOverlay":false,"duration":"","fillerCollections":[{"id":"","weight":"","cooldownSeconds":""}],"fillerRepeatCooldown":"","groupTitle":"","guideFlexTitle":"","guideMinimumDuration":"","icon":{"path":"","width":"","duration":"","position":""},"id":"","name":"","number":"","offline":{"picture":"","soundtrack":"","mode":""},"startTime":"","stealth":false,"transcoding":{"targetResolution":"","videoBitrate":"","videoBufferSize":""},"watermark":{"url":"","enabled":false,"position":"","width":"","verticalMargin":"","horizontalMargin":"","duration":"","fixedSize":false,"animated":false,"opacity":0,"fadeConfig":[{"programType":"","periodMins":"","leadingEdge":false}]},"onDemand":{"enabled":false},"streamMode":"","transcodeConfigId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"disableFillerOverlay": @NO,
@"duration": @"",
@"fillerCollections": @[ @{ @"id": @"", @"weight": @"", @"cooldownSeconds": @"" } ],
@"fillerRepeatCooldown": @"",
@"groupTitle": @"",
@"guideFlexTitle": @"",
@"guideMinimumDuration": @"",
@"icon": @{ @"path": @"", @"width": @"", @"duration": @"", @"position": @"" },
@"id": @"",
@"name": @"",
@"number": @"",
@"offline": @{ @"picture": @"", @"soundtrack": @"", @"mode": @"" },
@"startTime": @"",
@"stealth": @NO,
@"transcoding": @{ @"targetResolution": @"", @"videoBitrate": @"", @"videoBufferSize": @"" },
@"watermark": @{ @"url": @"", @"enabled": @NO, @"position": @"", @"width": @"", @"verticalMargin": @"", @"horizontalMargin": @"", @"duration": @"", @"fixedSize": @NO, @"animated": @NO, @"opacity": @0, @"fadeConfig": @[ @{ @"programType": @"", @"periodMins": @"", @"leadingEdge": @NO } ] },
@"onDemand": @{ @"enabled": @NO },
@"streamMode": @"",
@"transcodeConfigId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/channels/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[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}}/api/channels/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/channels/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'disableFillerOverlay' => null,
'duration' => '',
'fillerCollections' => [
[
'id' => '',
'weight' => '',
'cooldownSeconds' => ''
]
],
'fillerRepeatCooldown' => '',
'groupTitle' => '',
'guideFlexTitle' => '',
'guideMinimumDuration' => '',
'icon' => [
'path' => '',
'width' => '',
'duration' => '',
'position' => ''
],
'id' => '',
'name' => '',
'number' => '',
'offline' => [
'picture' => '',
'soundtrack' => '',
'mode' => ''
],
'startTime' => '',
'stealth' => null,
'transcoding' => [
'targetResolution' => '',
'videoBitrate' => '',
'videoBufferSize' => ''
],
'watermark' => [
'url' => '',
'enabled' => null,
'position' => '',
'width' => '',
'verticalMargin' => '',
'horizontalMargin' => '',
'duration' => '',
'fixedSize' => null,
'animated' => null,
'opacity' => 0,
'fadeConfig' => [
[
'programType' => '',
'periodMins' => '',
'leadingEdge' => null
]
]
],
'onDemand' => [
'enabled' => null
],
'streamMode' => '',
'transcodeConfigId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/api/channels/:id', [
'body' => '{
"disableFillerOverlay": false,
"duration": "",
"fillerCollections": [
{
"id": "",
"weight": "",
"cooldownSeconds": ""
}
],
"fillerRepeatCooldown": "",
"groupTitle": "",
"guideFlexTitle": "",
"guideMinimumDuration": "",
"icon": {
"path": "",
"width": "",
"duration": "",
"position": ""
},
"id": "",
"name": "",
"number": "",
"offline": {
"picture": "",
"soundtrack": "",
"mode": ""
},
"startTime": "",
"stealth": false,
"transcoding": {
"targetResolution": "",
"videoBitrate": "",
"videoBufferSize": ""
},
"watermark": {
"url": "",
"enabled": false,
"position": "",
"width": "",
"verticalMargin": "",
"horizontalMargin": "",
"duration": "",
"fixedSize": false,
"animated": false,
"opacity": 0,
"fadeConfig": [
{
"programType": "",
"periodMins": "",
"leadingEdge": false
}
]
},
"onDemand": {
"enabled": false
},
"streamMode": "",
"transcodeConfigId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/channels/:id');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'disableFillerOverlay' => null,
'duration' => '',
'fillerCollections' => [
[
'id' => '',
'weight' => '',
'cooldownSeconds' => ''
]
],
'fillerRepeatCooldown' => '',
'groupTitle' => '',
'guideFlexTitle' => '',
'guideMinimumDuration' => '',
'icon' => [
'path' => '',
'width' => '',
'duration' => '',
'position' => ''
],
'id' => '',
'name' => '',
'number' => '',
'offline' => [
'picture' => '',
'soundtrack' => '',
'mode' => ''
],
'startTime' => '',
'stealth' => null,
'transcoding' => [
'targetResolution' => '',
'videoBitrate' => '',
'videoBufferSize' => ''
],
'watermark' => [
'url' => '',
'enabled' => null,
'position' => '',
'width' => '',
'verticalMargin' => '',
'horizontalMargin' => '',
'duration' => '',
'fixedSize' => null,
'animated' => null,
'opacity' => 0,
'fadeConfig' => [
[
'programType' => '',
'periodMins' => '',
'leadingEdge' => null
]
]
],
'onDemand' => [
'enabled' => null
],
'streamMode' => '',
'transcodeConfigId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'disableFillerOverlay' => null,
'duration' => '',
'fillerCollections' => [
[
'id' => '',
'weight' => '',
'cooldownSeconds' => ''
]
],
'fillerRepeatCooldown' => '',
'groupTitle' => '',
'guideFlexTitle' => '',
'guideMinimumDuration' => '',
'icon' => [
'path' => '',
'width' => '',
'duration' => '',
'position' => ''
],
'id' => '',
'name' => '',
'number' => '',
'offline' => [
'picture' => '',
'soundtrack' => '',
'mode' => ''
],
'startTime' => '',
'stealth' => null,
'transcoding' => [
'targetResolution' => '',
'videoBitrate' => '',
'videoBufferSize' => ''
],
'watermark' => [
'url' => '',
'enabled' => null,
'position' => '',
'width' => '',
'verticalMargin' => '',
'horizontalMargin' => '',
'duration' => '',
'fixedSize' => null,
'animated' => null,
'opacity' => 0,
'fadeConfig' => [
[
'programType' => '',
'periodMins' => '',
'leadingEdge' => null
]
]
],
'onDemand' => [
'enabled' => null
],
'streamMode' => '',
'transcodeConfigId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/channels/:id');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/channels/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"disableFillerOverlay": false,
"duration": "",
"fillerCollections": [
{
"id": "",
"weight": "",
"cooldownSeconds": ""
}
],
"fillerRepeatCooldown": "",
"groupTitle": "",
"guideFlexTitle": "",
"guideMinimumDuration": "",
"icon": {
"path": "",
"width": "",
"duration": "",
"position": ""
},
"id": "",
"name": "",
"number": "",
"offline": {
"picture": "",
"soundtrack": "",
"mode": ""
},
"startTime": "",
"stealth": false,
"transcoding": {
"targetResolution": "",
"videoBitrate": "",
"videoBufferSize": ""
},
"watermark": {
"url": "",
"enabled": false,
"position": "",
"width": "",
"verticalMargin": "",
"horizontalMargin": "",
"duration": "",
"fixedSize": false,
"animated": false,
"opacity": 0,
"fadeConfig": [
{
"programType": "",
"periodMins": "",
"leadingEdge": false
}
]
},
"onDemand": {
"enabled": false
},
"streamMode": "",
"transcodeConfigId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/channels/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"disableFillerOverlay": false,
"duration": "",
"fillerCollections": [
{
"id": "",
"weight": "",
"cooldownSeconds": ""
}
],
"fillerRepeatCooldown": "",
"groupTitle": "",
"guideFlexTitle": "",
"guideMinimumDuration": "",
"icon": {
"path": "",
"width": "",
"duration": "",
"position": ""
},
"id": "",
"name": "",
"number": "",
"offline": {
"picture": "",
"soundtrack": "",
"mode": ""
},
"startTime": "",
"stealth": false,
"transcoding": {
"targetResolution": "",
"videoBitrate": "",
"videoBufferSize": ""
},
"watermark": {
"url": "",
"enabled": false,
"position": "",
"width": "",
"verticalMargin": "",
"horizontalMargin": "",
"duration": "",
"fixedSize": false,
"animated": false,
"opacity": 0,
"fadeConfig": [
{
"programType": "",
"periodMins": "",
"leadingEdge": false
}
]
},
"onDemand": {
"enabled": false
},
"streamMode": "",
"transcodeConfigId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/api/channels/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/channels/:id"
payload = {
"disableFillerOverlay": False,
"duration": "",
"fillerCollections": [
{
"id": "",
"weight": "",
"cooldownSeconds": ""
}
],
"fillerRepeatCooldown": "",
"groupTitle": "",
"guideFlexTitle": "",
"guideMinimumDuration": "",
"icon": {
"path": "",
"width": "",
"duration": "",
"position": ""
},
"id": "",
"name": "",
"number": "",
"offline": {
"picture": "",
"soundtrack": "",
"mode": ""
},
"startTime": "",
"stealth": False,
"transcoding": {
"targetResolution": "",
"videoBitrate": "",
"videoBufferSize": ""
},
"watermark": {
"url": "",
"enabled": False,
"position": "",
"width": "",
"verticalMargin": "",
"horizontalMargin": "",
"duration": "",
"fixedSize": False,
"animated": False,
"opacity": 0,
"fadeConfig": [
{
"programType": "",
"periodMins": "",
"leadingEdge": False
}
]
},
"onDemand": { "enabled": False },
"streamMode": "",
"transcodeConfigId": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/channels/:id"
payload <- "{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/channels/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\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.put('/baseUrl/api/channels/:id') do |req|
req.body = "{\n \"disableFillerOverlay\": false,\n \"duration\": \"\",\n \"fillerCollections\": [\n {\n \"id\": \"\",\n \"weight\": \"\",\n \"cooldownSeconds\": \"\"\n }\n ],\n \"fillerRepeatCooldown\": \"\",\n \"groupTitle\": \"\",\n \"guideFlexTitle\": \"\",\n \"guideMinimumDuration\": \"\",\n \"icon\": {\n \"path\": \"\",\n \"width\": \"\",\n \"duration\": \"\",\n \"position\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"number\": \"\",\n \"offline\": {\n \"picture\": \"\",\n \"soundtrack\": \"\",\n \"mode\": \"\"\n },\n \"startTime\": \"\",\n \"stealth\": false,\n \"transcoding\": {\n \"targetResolution\": \"\",\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\"\n },\n \"watermark\": {\n \"url\": \"\",\n \"enabled\": false,\n \"position\": \"\",\n \"width\": \"\",\n \"verticalMargin\": \"\",\n \"horizontalMargin\": \"\",\n \"duration\": \"\",\n \"fixedSize\": false,\n \"animated\": false,\n \"opacity\": 0,\n \"fadeConfig\": [\n {\n \"programType\": \"\",\n \"periodMins\": \"\",\n \"leadingEdge\": false\n }\n ]\n },\n \"onDemand\": {\n \"enabled\": false\n },\n \"streamMode\": \"\",\n \"transcodeConfigId\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/channels/:id";
let payload = json!({
"disableFillerOverlay": false,
"duration": "",
"fillerCollections": (
json!({
"id": "",
"weight": "",
"cooldownSeconds": ""
})
),
"fillerRepeatCooldown": "",
"groupTitle": "",
"guideFlexTitle": "",
"guideMinimumDuration": "",
"icon": json!({
"path": "",
"width": "",
"duration": "",
"position": ""
}),
"id": "",
"name": "",
"number": "",
"offline": json!({
"picture": "",
"soundtrack": "",
"mode": ""
}),
"startTime": "",
"stealth": false,
"transcoding": json!({
"targetResolution": "",
"videoBitrate": "",
"videoBufferSize": ""
}),
"watermark": json!({
"url": "",
"enabled": false,
"position": "",
"width": "",
"verticalMargin": "",
"horizontalMargin": "",
"duration": "",
"fixedSize": false,
"animated": false,
"opacity": 0,
"fadeConfig": (
json!({
"programType": "",
"periodMins": "",
"leadingEdge": false
})
)
}),
"onDemand": json!({"enabled": false}),
"streamMode": "",
"transcodeConfigId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/api/channels/:id \
--header 'content-type: application/json' \
--data '{
"disableFillerOverlay": false,
"duration": "",
"fillerCollections": [
{
"id": "",
"weight": "",
"cooldownSeconds": ""
}
],
"fillerRepeatCooldown": "",
"groupTitle": "",
"guideFlexTitle": "",
"guideMinimumDuration": "",
"icon": {
"path": "",
"width": "",
"duration": "",
"position": ""
},
"id": "",
"name": "",
"number": "",
"offline": {
"picture": "",
"soundtrack": "",
"mode": ""
},
"startTime": "",
"stealth": false,
"transcoding": {
"targetResolution": "",
"videoBitrate": "",
"videoBufferSize": ""
},
"watermark": {
"url": "",
"enabled": false,
"position": "",
"width": "",
"verticalMargin": "",
"horizontalMargin": "",
"duration": "",
"fixedSize": false,
"animated": false,
"opacity": 0,
"fadeConfig": [
{
"programType": "",
"periodMins": "",
"leadingEdge": false
}
]
},
"onDemand": {
"enabled": false
},
"streamMode": "",
"transcodeConfigId": ""
}'
echo '{
"disableFillerOverlay": false,
"duration": "",
"fillerCollections": [
{
"id": "",
"weight": "",
"cooldownSeconds": ""
}
],
"fillerRepeatCooldown": "",
"groupTitle": "",
"guideFlexTitle": "",
"guideMinimumDuration": "",
"icon": {
"path": "",
"width": "",
"duration": "",
"position": ""
},
"id": "",
"name": "",
"number": "",
"offline": {
"picture": "",
"soundtrack": "",
"mode": ""
},
"startTime": "",
"stealth": false,
"transcoding": {
"targetResolution": "",
"videoBitrate": "",
"videoBufferSize": ""
},
"watermark": {
"url": "",
"enabled": false,
"position": "",
"width": "",
"verticalMargin": "",
"horizontalMargin": "",
"duration": "",
"fixedSize": false,
"animated": false,
"opacity": 0,
"fadeConfig": [
{
"programType": "",
"periodMins": "",
"leadingEdge": false
}
]
},
"onDemand": {
"enabled": false
},
"streamMode": "",
"transcodeConfigId": ""
}' | \
http PUT {{baseUrl}}/api/channels/:id \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "disableFillerOverlay": false,\n "duration": "",\n "fillerCollections": [\n {\n "id": "",\n "weight": "",\n "cooldownSeconds": ""\n }\n ],\n "fillerRepeatCooldown": "",\n "groupTitle": "",\n "guideFlexTitle": "",\n "guideMinimumDuration": "",\n "icon": {\n "path": "",\n "width": "",\n "duration": "",\n "position": ""\n },\n "id": "",\n "name": "",\n "number": "",\n "offline": {\n "picture": "",\n "soundtrack": "",\n "mode": ""\n },\n "startTime": "",\n "stealth": false,\n "transcoding": {\n "targetResolution": "",\n "videoBitrate": "",\n "videoBufferSize": ""\n },\n "watermark": {\n "url": "",\n "enabled": false,\n "position": "",\n "width": "",\n "verticalMargin": "",\n "horizontalMargin": "",\n "duration": "",\n "fixedSize": false,\n "animated": false,\n "opacity": 0,\n "fadeConfig": [\n {\n "programType": "",\n "periodMins": "",\n "leadingEdge": false\n }\n ]\n },\n "onDemand": {\n "enabled": false\n },\n "streamMode": "",\n "transcodeConfigId": ""\n}' \
--output-document \
- {{baseUrl}}/api/channels/:id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"disableFillerOverlay": false,
"duration": "",
"fillerCollections": [
[
"id": "",
"weight": "",
"cooldownSeconds": ""
]
],
"fillerRepeatCooldown": "",
"groupTitle": "",
"guideFlexTitle": "",
"guideMinimumDuration": "",
"icon": [
"path": "",
"width": "",
"duration": "",
"position": ""
],
"id": "",
"name": "",
"number": "",
"offline": [
"picture": "",
"soundtrack": "",
"mode": ""
],
"startTime": "",
"stealth": false,
"transcoding": [
"targetResolution": "",
"videoBitrate": "",
"videoBufferSize": ""
],
"watermark": [
"url": "",
"enabled": false,
"position": "",
"width": "",
"verticalMargin": "",
"horizontalMargin": "",
"duration": "",
"fixedSize": false,
"animated": false,
"opacity": 0,
"fadeConfig": [
[
"programType": "",
"periodMins": "",
"leadingEdge": false
]
]
],
"onDemand": ["enabled": false],
"streamMode": "",
"transcodeConfigId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/channels/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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
createCustomShow
{{baseUrl}}/api/custom-shows
BODY json
{
"name": "",
"programs": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/custom-shows");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"name\": \"\",\n \"programs\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/custom-shows" {:content-type :json
:form-params {:name ""
:programs []}})
require "http/client"
url = "{{baseUrl}}/api/custom-shows"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"programs\": []\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}}/api/custom-shows"),
Content = new StringContent("{\n \"name\": \"\",\n \"programs\": []\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}}/api/custom-shows");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"programs\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/custom-shows"
payload := strings.NewReader("{\n \"name\": \"\",\n \"programs\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
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/api/custom-shows HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 34
{
"name": "",
"programs": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/custom-shows")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"programs\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/custom-shows"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"programs\": []\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 \"name\": \"\",\n \"programs\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/custom-shows")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/custom-shows")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"programs\": []\n}")
.asString();
const data = JSON.stringify({
name: '',
programs: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/custom-shows');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/custom-shows',
headers: {'content-type': 'application/json'},
data: {name: '', programs: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/custom-shows';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","programs":[]}'
};
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}}/api/custom-shows',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "programs": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"programs\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/custom-shows")
.post(body)
.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/api/custom-shows',
headers: {
'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({name: '', programs: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/custom-shows',
headers: {'content-type': 'application/json'},
body: {name: '', programs: []},
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}}/api/custom-shows');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
programs: []
});
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}}/api/custom-shows',
headers: {'content-type': 'application/json'},
data: {name: '', programs: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/custom-shows';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","programs":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"name": @"",
@"programs": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/custom-shows"]
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}}/api/custom-shows" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"programs\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/custom-shows",
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([
'name' => '',
'programs' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/custom-shows', [
'body' => '{
"name": "",
"programs": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/custom-shows');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'programs' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'programs' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/api/custom-shows');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/custom-shows' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"programs": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/custom-shows' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"programs": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"programs\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/custom-shows", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/custom-shows"
payload = {
"name": "",
"programs": []
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/custom-shows"
payload <- "{\n \"name\": \"\",\n \"programs\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/custom-shows")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"name\": \"\",\n \"programs\": []\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/api/custom-shows') do |req|
req.body = "{\n \"name\": \"\",\n \"programs\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/custom-shows";
let payload = json!({
"name": "",
"programs": ()
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/api/custom-shows \
--header 'content-type: application/json' \
--data '{
"name": "",
"programs": []
}'
echo '{
"name": "",
"programs": []
}' | \
http POST {{baseUrl}}/api/custom-shows \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "programs": []\n}' \
--output-document \
- {{baseUrl}}/api/custom-shows
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"programs": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/custom-shows")! 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()
DELETE
deleteCustomShow
{{baseUrl}}/api/custom-shows/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/custom-shows/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/api/custom-shows/:id")
require "http/client"
url = "{{baseUrl}}/api/custom-shows/:id"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/api/custom-shows/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/custom-shows/:id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/custom-shows/:id"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/api/custom-shows/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/api/custom-shows/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/custom-shows/:id"))
.method("DELETE", 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}}/api/custom-shows/:id")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/api/custom-shows/:id")
.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('DELETE', '{{baseUrl}}/api/custom-shows/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/api/custom-shows/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/custom-shows/:id';
const options = {method: 'DELETE'};
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}}/api/custom-shows/:id',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/custom-shows/:id")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/custom-shows/:id',
headers: {}
};
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: 'DELETE', url: '{{baseUrl}}/api/custom-shows/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/api/custom-shows/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/api/custom-shows/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/custom-shows/:id';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/custom-shows/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
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}}/api/custom-shows/:id" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/custom-shows/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/api/custom-shows/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/custom-shows/:id');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/custom-shows/:id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/custom-shows/:id' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/custom-shows/:id' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/api/custom-shows/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/custom-shows/:id"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/custom-shows/:id"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/custom-shows/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/api/custom-shows/:id') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/custom-shows/:id";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/api/custom-shows/:id
http DELETE {{baseUrl}}/api/custom-shows/:id
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/api/custom-shows/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/custom-shows/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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
get -api-custom-shows--id-programs
{{baseUrl}}/api/custom-shows/:id/programs
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/custom-shows/:id/programs");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/custom-shows/:id/programs")
require "http/client"
url = "{{baseUrl}}/api/custom-shows/:id/programs"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/custom-shows/:id/programs"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/custom-shows/:id/programs");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/custom-shows/:id/programs"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/custom-shows/:id/programs HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/custom-shows/:id/programs")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/custom-shows/:id/programs"))
.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}}/api/custom-shows/:id/programs")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/custom-shows/:id/programs")
.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}}/api/custom-shows/:id/programs');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/custom-shows/:id/programs'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/custom-shows/:id/programs';
const options = {method: 'GET'};
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}}/api/custom-shows/:id/programs',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/custom-shows/:id/programs")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/custom-shows/:id/programs',
headers: {}
};
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}}/api/custom-shows/:id/programs'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/custom-shows/:id/programs');
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}}/api/custom-shows/:id/programs'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/custom-shows/:id/programs';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/custom-shows/:id/programs"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/custom-shows/:id/programs" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/custom-shows/:id/programs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/custom-shows/:id/programs');
echo $response->getBody();
setUrl('{{baseUrl}}/api/custom-shows/:id/programs');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/custom-shows/:id/programs');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/custom-shows/:id/programs' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/custom-shows/:id/programs' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/custom-shows/:id/programs")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/custom-shows/:id/programs"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/custom-shows/:id/programs"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/custom-shows/:id/programs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/custom-shows/:id/programs') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/custom-shows/:id/programs";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/custom-shows/:id/programs
http GET {{baseUrl}}/api/custom-shows/:id/programs
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/custom-shows/:id/programs
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/custom-shows/:id/programs")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-custom-shows--id
{{baseUrl}}/api/custom-shows/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/custom-shows/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/custom-shows/:id")
require "http/client"
url = "{{baseUrl}}/api/custom-shows/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/custom-shows/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/custom-shows/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/custom-shows/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/custom-shows/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/custom-shows/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/custom-shows/:id"))
.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}}/api/custom-shows/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/custom-shows/:id")
.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}}/api/custom-shows/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/custom-shows/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/custom-shows/:id';
const options = {method: 'GET'};
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}}/api/custom-shows/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/custom-shows/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/custom-shows/:id',
headers: {}
};
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}}/api/custom-shows/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/custom-shows/:id');
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}}/api/custom-shows/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/custom-shows/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/custom-shows/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/custom-shows/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/custom-shows/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/custom-shows/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/custom-shows/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/custom-shows/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/custom-shows/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/custom-shows/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/custom-shows/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/custom-shows/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/custom-shows/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/custom-shows/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/custom-shows/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/custom-shows/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/custom-shows/:id
http GET {{baseUrl}}/api/custom-shows/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/custom-shows/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/custom-shows/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-custom-shows
{{baseUrl}}/api/custom-shows
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/custom-shows");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/custom-shows")
require "http/client"
url = "{{baseUrl}}/api/custom-shows"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/custom-shows"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/custom-shows");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/custom-shows"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/custom-shows HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/custom-shows")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/custom-shows"))
.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}}/api/custom-shows")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/custom-shows")
.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}}/api/custom-shows');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/custom-shows'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/custom-shows';
const options = {method: 'GET'};
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}}/api/custom-shows',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/custom-shows")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/custom-shows',
headers: {}
};
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}}/api/custom-shows'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/custom-shows');
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}}/api/custom-shows'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/custom-shows';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/custom-shows"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/custom-shows" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/custom-shows",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/custom-shows');
echo $response->getBody();
setUrl('{{baseUrl}}/api/custom-shows');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/custom-shows');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/custom-shows' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/custom-shows' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/custom-shows")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/custom-shows"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/custom-shows"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/custom-shows")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/custom-shows') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/custom-shows";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/custom-shows
http GET {{baseUrl}}/api/custom-shows
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/custom-shows
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/custom-shows")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
PUT
put -api-custom-shows--id
{{baseUrl}}/api/custom-shows/:id
QUERY PARAMS
id
BODY json
{
"name": "",
"programs": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/custom-shows/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"name\": \"\",\n \"programs\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/api/custom-shows/:id" {:content-type :json
:form-params {:name ""
:programs []}})
require "http/client"
url = "{{baseUrl}}/api/custom-shows/:id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"programs\": []\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/api/custom-shows/:id"),
Content = new StringContent("{\n \"name\": \"\",\n \"programs\": []\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}}/api/custom-shows/:id");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"programs\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/custom-shows/:id"
payload := strings.NewReader("{\n \"name\": \"\",\n \"programs\": []\n}")
req, _ := http.NewRequest("PUT", url, payload)
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))
}
PUT /baseUrl/api/custom-shows/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 34
{
"name": "",
"programs": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/api/custom-shows/:id")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"programs\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/custom-shows/:id"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"programs\": []\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 \"name\": \"\",\n \"programs\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/custom-shows/:id")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/api/custom-shows/:id")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"programs\": []\n}")
.asString();
const data = JSON.stringify({
name: '',
programs: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/api/custom-shows/:id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/custom-shows/:id',
headers: {'content-type': 'application/json'},
data: {name: '', programs: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/custom-shows/:id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"name":"","programs":[]}'
};
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}}/api/custom-shows/:id',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "programs": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"programs\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/custom-shows/:id")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/custom-shows/:id',
headers: {
'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({name: '', programs: []}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/custom-shows/:id',
headers: {'content-type': 'application/json'},
body: {name: '', programs: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/api/custom-shows/:id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
programs: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/custom-shows/:id',
headers: {'content-type': 'application/json'},
data: {name: '', programs: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/custom-shows/:id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"name":"","programs":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"name": @"",
@"programs": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/custom-shows/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[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}}/api/custom-shows/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"programs\": []\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/custom-shows/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '',
'programs' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/api/custom-shows/:id', [
'body' => '{
"name": "",
"programs": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/custom-shows/:id');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'programs' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'programs' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/api/custom-shows/:id');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/custom-shows/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"programs": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/custom-shows/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"programs": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"programs\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/api/custom-shows/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/custom-shows/:id"
payload = {
"name": "",
"programs": []
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/custom-shows/:id"
payload <- "{\n \"name\": \"\",\n \"programs\": []\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/custom-shows/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"name\": \"\",\n \"programs\": []\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.put('/baseUrl/api/custom-shows/:id') do |req|
req.body = "{\n \"name\": \"\",\n \"programs\": []\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/custom-shows/:id";
let payload = json!({
"name": "",
"programs": ()
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/api/custom-shows/:id \
--header 'content-type: application/json' \
--data '{
"name": "",
"programs": []
}'
echo '{
"name": "",
"programs": []
}' | \
http PUT {{baseUrl}}/api/custom-shows/:id \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "programs": []\n}' \
--output-document \
- {{baseUrl}}/api/custom-shows/:id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"programs": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/custom-shows/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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
get -api-debug-channels-reload_all_lineups
{{baseUrl}}/api/debug/channels/reload_all_lineups
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/debug/channels/reload_all_lineups");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/debug/channels/reload_all_lineups")
require "http/client"
url = "{{baseUrl}}/api/debug/channels/reload_all_lineups"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/debug/channels/reload_all_lineups"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/debug/channels/reload_all_lineups");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/debug/channels/reload_all_lineups"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/debug/channels/reload_all_lineups HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/debug/channels/reload_all_lineups")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/debug/channels/reload_all_lineups"))
.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}}/api/debug/channels/reload_all_lineups")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/debug/channels/reload_all_lineups")
.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}}/api/debug/channels/reload_all_lineups');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/debug/channels/reload_all_lineups'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/debug/channels/reload_all_lineups';
const options = {method: 'GET'};
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}}/api/debug/channels/reload_all_lineups',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/debug/channels/reload_all_lineups")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/debug/channels/reload_all_lineups',
headers: {}
};
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}}/api/debug/channels/reload_all_lineups'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/debug/channels/reload_all_lineups');
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}}/api/debug/channels/reload_all_lineups'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/debug/channels/reload_all_lineups';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/debug/channels/reload_all_lineups"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/debug/channels/reload_all_lineups" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/debug/channels/reload_all_lineups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/debug/channels/reload_all_lineups');
echo $response->getBody();
setUrl('{{baseUrl}}/api/debug/channels/reload_all_lineups');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/debug/channels/reload_all_lineups');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/debug/channels/reload_all_lineups' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/debug/channels/reload_all_lineups' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/debug/channels/reload_all_lineups")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/debug/channels/reload_all_lineups"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/debug/channels/reload_all_lineups"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/debug/channels/reload_all_lineups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/debug/channels/reload_all_lineups') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/debug/channels/reload_all_lineups";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/debug/channels/reload_all_lineups
http GET {{baseUrl}}/api/debug/channels/reload_all_lineups
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/debug/channels/reload_all_lineups
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/debug/channels/reload_all_lineups")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-debug-db-backup
{{baseUrl}}/api/debug/db/backup
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/debug/db/backup");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/debug/db/backup")
require "http/client"
url = "{{baseUrl}}/api/debug/db/backup"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/debug/db/backup"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/debug/db/backup");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/debug/db/backup"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/debug/db/backup HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/debug/db/backup")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/debug/db/backup"))
.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}}/api/debug/db/backup")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/debug/db/backup")
.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}}/api/debug/db/backup');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/debug/db/backup'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/debug/db/backup';
const options = {method: 'GET'};
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}}/api/debug/db/backup',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/debug/db/backup")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/debug/db/backup',
headers: {}
};
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}}/api/debug/db/backup'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/debug/db/backup');
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}}/api/debug/db/backup'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/debug/db/backup';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/debug/db/backup"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/debug/db/backup" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/debug/db/backup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/debug/db/backup');
echo $response->getBody();
setUrl('{{baseUrl}}/api/debug/db/backup');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/debug/db/backup');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/debug/db/backup' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/debug/db/backup' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/debug/db/backup")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/debug/db/backup"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/debug/db/backup"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/debug/db/backup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/debug/db/backup') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/debug/db/backup";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/debug/db/backup
http GET {{baseUrl}}/api/debug/db/backup
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/debug/db/backup
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/debug/db/backup")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-debug-db-test_direct_access
{{baseUrl}}/api/debug/db/test_direct_access
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/debug/db/test_direct_access?id=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/debug/db/test_direct_access" {:query-params {:id ""}})
require "http/client"
url = "{{baseUrl}}/api/debug/db/test_direct_access?id="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/debug/db/test_direct_access?id="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/debug/db/test_direct_access?id=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/debug/db/test_direct_access?id="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/debug/db/test_direct_access?id= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/debug/db/test_direct_access?id=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/debug/db/test_direct_access?id="))
.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}}/api/debug/db/test_direct_access?id=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/debug/db/test_direct_access?id=")
.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}}/api/debug/db/test_direct_access?id=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/debug/db/test_direct_access',
params: {id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/debug/db/test_direct_access?id=';
const options = {method: 'GET'};
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}}/api/debug/db/test_direct_access?id=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/debug/db/test_direct_access?id=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/debug/db/test_direct_access?id=',
headers: {}
};
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}}/api/debug/db/test_direct_access',
qs: {id: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/debug/db/test_direct_access');
req.query({
id: ''
});
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}}/api/debug/db/test_direct_access',
params: {id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/debug/db/test_direct_access?id=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/debug/db/test_direct_access?id="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/debug/db/test_direct_access?id=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/debug/db/test_direct_access?id=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/debug/db/test_direct_access?id=');
echo $response->getBody();
setUrl('{{baseUrl}}/api/debug/db/test_direct_access');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'id' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/debug/db/test_direct_access');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'id' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/debug/db/test_direct_access?id=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/debug/db/test_direct_access?id=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/debug/db/test_direct_access?id=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/debug/db/test_direct_access"
querystring = {"id":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/debug/db/test_direct_access"
queryString <- list(id = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/debug/db/test_direct_access?id=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/debug/db/test_direct_access') do |req|
req.params['id'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/debug/db/test_direct_access";
let querystring = [
("id", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/api/debug/db/test_direct_access?id='
http GET '{{baseUrl}}/api/debug/db/test_direct_access?id='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/api/debug/db/test_direct_access?id='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/debug/db/test_direct_access?id=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-debug-ffmpeg-pipeline
{{baseUrl}}/api/debug/ffmpeg/pipeline
QUERY PARAMS
channel
path
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/debug/ffmpeg/pipeline?channel=&path=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/debug/ffmpeg/pipeline" {:query-params {:channel ""
:path ""}})
require "http/client"
url = "{{baseUrl}}/api/debug/ffmpeg/pipeline?channel=&path="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/debug/ffmpeg/pipeline?channel=&path="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/debug/ffmpeg/pipeline?channel=&path=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/debug/ffmpeg/pipeline?channel=&path="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/debug/ffmpeg/pipeline?channel=&path= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/debug/ffmpeg/pipeline?channel=&path=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/debug/ffmpeg/pipeline?channel=&path="))
.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}}/api/debug/ffmpeg/pipeline?channel=&path=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/debug/ffmpeg/pipeline?channel=&path=")
.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}}/api/debug/ffmpeg/pipeline?channel=&path=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/debug/ffmpeg/pipeline',
params: {channel: '', path: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/debug/ffmpeg/pipeline?channel=&path=';
const options = {method: 'GET'};
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}}/api/debug/ffmpeg/pipeline?channel=&path=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/debug/ffmpeg/pipeline?channel=&path=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/debug/ffmpeg/pipeline?channel=&path=',
headers: {}
};
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}}/api/debug/ffmpeg/pipeline',
qs: {channel: '', path: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/debug/ffmpeg/pipeline');
req.query({
channel: '',
path: ''
});
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}}/api/debug/ffmpeg/pipeline',
params: {channel: '', path: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/debug/ffmpeg/pipeline?channel=&path=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/debug/ffmpeg/pipeline?channel=&path="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/debug/ffmpeg/pipeline?channel=&path=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/debug/ffmpeg/pipeline?channel=&path=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/debug/ffmpeg/pipeline?channel=&path=');
echo $response->getBody();
setUrl('{{baseUrl}}/api/debug/ffmpeg/pipeline');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'channel' => '',
'path' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/debug/ffmpeg/pipeline');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'channel' => '',
'path' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/debug/ffmpeg/pipeline?channel=&path=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/debug/ffmpeg/pipeline?channel=&path=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/debug/ffmpeg/pipeline?channel=&path=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/debug/ffmpeg/pipeline"
querystring = {"channel":"","path":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/debug/ffmpeg/pipeline"
queryString <- list(
channel = "",
path = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/debug/ffmpeg/pipeline?channel=&path=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/debug/ffmpeg/pipeline') do |req|
req.params['channel'] = ''
req.params['path'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/debug/ffmpeg/pipeline";
let querystring = [
("channel", ""),
("path", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/api/debug/ffmpeg/pipeline?channel=&path='
http GET '{{baseUrl}}/api/debug/ffmpeg/pipeline?channel=&path='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/api/debug/ffmpeg/pipeline?channel=&path='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/debug/ffmpeg/pipeline?channel=&path=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-debug-ffmpeg-probe
{{baseUrl}}/api/debug/ffmpeg/probe
QUERY PARAMS
path
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/debug/ffmpeg/probe?path=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/debug/ffmpeg/probe" {:query-params {:path ""}})
require "http/client"
url = "{{baseUrl}}/api/debug/ffmpeg/probe?path="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/debug/ffmpeg/probe?path="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/debug/ffmpeg/probe?path=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/debug/ffmpeg/probe?path="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/debug/ffmpeg/probe?path= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/debug/ffmpeg/probe?path=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/debug/ffmpeg/probe?path="))
.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}}/api/debug/ffmpeg/probe?path=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/debug/ffmpeg/probe?path=")
.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}}/api/debug/ffmpeg/probe?path=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/debug/ffmpeg/probe',
params: {path: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/debug/ffmpeg/probe?path=';
const options = {method: 'GET'};
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}}/api/debug/ffmpeg/probe?path=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/debug/ffmpeg/probe?path=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/debug/ffmpeg/probe?path=',
headers: {}
};
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}}/api/debug/ffmpeg/probe',
qs: {path: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/debug/ffmpeg/probe');
req.query({
path: ''
});
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}}/api/debug/ffmpeg/probe',
params: {path: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/debug/ffmpeg/probe?path=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/debug/ffmpeg/probe?path="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/debug/ffmpeg/probe?path=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/debug/ffmpeg/probe?path=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/debug/ffmpeg/probe?path=');
echo $response->getBody();
setUrl('{{baseUrl}}/api/debug/ffmpeg/probe');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'path' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/debug/ffmpeg/probe');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'path' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/debug/ffmpeg/probe?path=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/debug/ffmpeg/probe?path=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/debug/ffmpeg/probe?path=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/debug/ffmpeg/probe"
querystring = {"path":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/debug/ffmpeg/probe"
queryString <- list(path = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/debug/ffmpeg/probe?path=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/debug/ffmpeg/probe') do |req|
req.params['path'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/debug/ffmpeg/probe";
let querystring = [
("path", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/api/debug/ffmpeg/probe?path='
http GET '{{baseUrl}}/api/debug/ffmpeg/probe?path='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/api/debug/ffmpeg/probe?path='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/debug/ffmpeg/probe?path=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-debug-helpers-channels--id-build_guide
{{baseUrl}}/api/debug/helpers/channels/:id/build_guide
QUERY PARAMS
from
to
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/debug/helpers/channels/:id/build_guide?from=&to=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/debug/helpers/channels/:id/build_guide" {:query-params {:from ""
:to ""}})
require "http/client"
url = "{{baseUrl}}/api/debug/helpers/channels/:id/build_guide?from=&to="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/debug/helpers/channels/:id/build_guide?from=&to="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/debug/helpers/channels/:id/build_guide?from=&to=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/debug/helpers/channels/:id/build_guide?from=&to="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/debug/helpers/channels/:id/build_guide?from=&to= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/debug/helpers/channels/:id/build_guide?from=&to=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/debug/helpers/channels/:id/build_guide?from=&to="))
.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}}/api/debug/helpers/channels/:id/build_guide?from=&to=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/debug/helpers/channels/:id/build_guide?from=&to=")
.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}}/api/debug/helpers/channels/:id/build_guide?from=&to=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/debug/helpers/channels/:id/build_guide',
params: {from: '', to: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/debug/helpers/channels/:id/build_guide?from=&to=';
const options = {method: 'GET'};
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}}/api/debug/helpers/channels/:id/build_guide?from=&to=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/debug/helpers/channels/:id/build_guide?from=&to=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/debug/helpers/channels/:id/build_guide?from=&to=',
headers: {}
};
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}}/api/debug/helpers/channels/:id/build_guide',
qs: {from: '', to: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/debug/helpers/channels/:id/build_guide');
req.query({
from: '',
to: ''
});
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}}/api/debug/helpers/channels/:id/build_guide',
params: {from: '', to: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/debug/helpers/channels/:id/build_guide?from=&to=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/debug/helpers/channels/:id/build_guide?from=&to="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/debug/helpers/channels/:id/build_guide?from=&to=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/debug/helpers/channels/:id/build_guide?from=&to=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/debug/helpers/channels/:id/build_guide?from=&to=');
echo $response->getBody();
setUrl('{{baseUrl}}/api/debug/helpers/channels/:id/build_guide');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'from' => '',
'to' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/debug/helpers/channels/:id/build_guide');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'from' => '',
'to' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/debug/helpers/channels/:id/build_guide?from=&to=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/debug/helpers/channels/:id/build_guide?from=&to=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/debug/helpers/channels/:id/build_guide?from=&to=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/debug/helpers/channels/:id/build_guide"
querystring = {"from":"","to":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/debug/helpers/channels/:id/build_guide"
queryString <- list(
from = "",
to = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/debug/helpers/channels/:id/build_guide?from=&to=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/debug/helpers/channels/:id/build_guide') do |req|
req.params['from'] = ''
req.params['to'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/debug/helpers/channels/:id/build_guide";
let querystring = [
("from", ""),
("to", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/api/debug/helpers/channels/:id/build_guide?from=&to='
http GET '{{baseUrl}}/api/debug/helpers/channels/:id/build_guide?from=&to='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/api/debug/helpers/channels/:id/build_guide?from=&to='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/debug/helpers/channels/:id/build_guide?from=&to=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-debug-helpers-create_guide
{{baseUrl}}/api/debug/helpers/create_guide
QUERY PARAMS
channelId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/debug/helpers/create_guide?channelId=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/debug/helpers/create_guide" {:query-params {:channelId ""}})
require "http/client"
url = "{{baseUrl}}/api/debug/helpers/create_guide?channelId="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/debug/helpers/create_guide?channelId="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/debug/helpers/create_guide?channelId=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/debug/helpers/create_guide?channelId="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/debug/helpers/create_guide?channelId= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/debug/helpers/create_guide?channelId=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/debug/helpers/create_guide?channelId="))
.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}}/api/debug/helpers/create_guide?channelId=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/debug/helpers/create_guide?channelId=")
.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}}/api/debug/helpers/create_guide?channelId=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/debug/helpers/create_guide',
params: {channelId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/debug/helpers/create_guide?channelId=';
const options = {method: 'GET'};
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}}/api/debug/helpers/create_guide?channelId=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/debug/helpers/create_guide?channelId=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/debug/helpers/create_guide?channelId=',
headers: {}
};
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}}/api/debug/helpers/create_guide',
qs: {channelId: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/debug/helpers/create_guide');
req.query({
channelId: ''
});
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}}/api/debug/helpers/create_guide',
params: {channelId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/debug/helpers/create_guide?channelId=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/debug/helpers/create_guide?channelId="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/debug/helpers/create_guide?channelId=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/debug/helpers/create_guide?channelId=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/debug/helpers/create_guide?channelId=');
echo $response->getBody();
setUrl('{{baseUrl}}/api/debug/helpers/create_guide');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'channelId' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/debug/helpers/create_guide');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'channelId' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/debug/helpers/create_guide?channelId=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/debug/helpers/create_guide?channelId=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/debug/helpers/create_guide?channelId=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/debug/helpers/create_guide"
querystring = {"channelId":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/debug/helpers/create_guide"
queryString <- list(channelId = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/debug/helpers/create_guide?channelId=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/debug/helpers/create_guide') do |req|
req.params['channelId'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/debug/helpers/create_guide";
let querystring = [
("channelId", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/api/debug/helpers/create_guide?channelId='
http GET '{{baseUrl}}/api/debug/helpers/create_guide?channelId='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/api/debug/helpers/create_guide?channelId='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/debug/helpers/create_guide?channelId=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-debug-helpers-current_program
{{baseUrl}}/api/debug/helpers/current_program
QUERY PARAMS
channelId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/debug/helpers/current_program?channelId=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/debug/helpers/current_program" {:query-params {:channelId ""}})
require "http/client"
url = "{{baseUrl}}/api/debug/helpers/current_program?channelId="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/debug/helpers/current_program?channelId="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/debug/helpers/current_program?channelId=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/debug/helpers/current_program?channelId="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/debug/helpers/current_program?channelId= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/debug/helpers/current_program?channelId=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/debug/helpers/current_program?channelId="))
.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}}/api/debug/helpers/current_program?channelId=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/debug/helpers/current_program?channelId=")
.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}}/api/debug/helpers/current_program?channelId=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/debug/helpers/current_program',
params: {channelId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/debug/helpers/current_program?channelId=';
const options = {method: 'GET'};
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}}/api/debug/helpers/current_program?channelId=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/debug/helpers/current_program?channelId=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/debug/helpers/current_program?channelId=',
headers: {}
};
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}}/api/debug/helpers/current_program',
qs: {channelId: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/debug/helpers/current_program');
req.query({
channelId: ''
});
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}}/api/debug/helpers/current_program',
params: {channelId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/debug/helpers/current_program?channelId=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/debug/helpers/current_program?channelId="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/debug/helpers/current_program?channelId=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/debug/helpers/current_program?channelId=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/debug/helpers/current_program?channelId=');
echo $response->getBody();
setUrl('{{baseUrl}}/api/debug/helpers/current_program');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'channelId' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/debug/helpers/current_program');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'channelId' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/debug/helpers/current_program?channelId=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/debug/helpers/current_program?channelId=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/debug/helpers/current_program?channelId=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/debug/helpers/current_program"
querystring = {"channelId":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/debug/helpers/current_program"
queryString <- list(channelId = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/debug/helpers/current_program?channelId=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/debug/helpers/current_program') do |req|
req.params['channelId'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/debug/helpers/current_program";
let querystring = [
("channelId", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/api/debug/helpers/current_program?channelId='
http GET '{{baseUrl}}/api/debug/helpers/current_program?channelId='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/api/debug/helpers/current_program?channelId='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/debug/helpers/current_program?channelId=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-debug-helpers-promote_lineup
{{baseUrl}}/api/debug/helpers/promote_lineup
QUERY PARAMS
channelId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/debug/helpers/promote_lineup?channelId=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/debug/helpers/promote_lineup" {:query-params {:channelId ""}})
require "http/client"
url = "{{baseUrl}}/api/debug/helpers/promote_lineup?channelId="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/debug/helpers/promote_lineup?channelId="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/debug/helpers/promote_lineup?channelId=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/debug/helpers/promote_lineup?channelId="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/debug/helpers/promote_lineup?channelId= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/debug/helpers/promote_lineup?channelId=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/debug/helpers/promote_lineup?channelId="))
.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}}/api/debug/helpers/promote_lineup?channelId=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/debug/helpers/promote_lineup?channelId=")
.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}}/api/debug/helpers/promote_lineup?channelId=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/debug/helpers/promote_lineup',
params: {channelId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/debug/helpers/promote_lineup?channelId=';
const options = {method: 'GET'};
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}}/api/debug/helpers/promote_lineup?channelId=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/debug/helpers/promote_lineup?channelId=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/debug/helpers/promote_lineup?channelId=',
headers: {}
};
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}}/api/debug/helpers/promote_lineup',
qs: {channelId: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/debug/helpers/promote_lineup');
req.query({
channelId: ''
});
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}}/api/debug/helpers/promote_lineup',
params: {channelId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/debug/helpers/promote_lineup?channelId=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/debug/helpers/promote_lineup?channelId="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/debug/helpers/promote_lineup?channelId=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/debug/helpers/promote_lineup?channelId=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/debug/helpers/promote_lineup?channelId=');
echo $response->getBody();
setUrl('{{baseUrl}}/api/debug/helpers/promote_lineup');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'channelId' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/debug/helpers/promote_lineup');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'channelId' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/debug/helpers/promote_lineup?channelId=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/debug/helpers/promote_lineup?channelId=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/debug/helpers/promote_lineup?channelId=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/debug/helpers/promote_lineup"
querystring = {"channelId":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/debug/helpers/promote_lineup"
queryString <- list(channelId = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/debug/helpers/promote_lineup?channelId=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/debug/helpers/promote_lineup') do |req|
req.params['channelId'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/debug/helpers/promote_lineup";
let querystring = [
("channelId", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/api/debug/helpers/promote_lineup?channelId='
http GET '{{baseUrl}}/api/debug/helpers/promote_lineup?channelId='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/api/debug/helpers/promote_lineup?channelId='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/debug/helpers/promote_lineup?channelId=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-debug-helpers-random_filler
{{baseUrl}}/api/debug/helpers/random_filler
QUERY PARAMS
channelId
maxDuration
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/debug/helpers/random_filler?channelId=&maxDuration=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/debug/helpers/random_filler" {:query-params {:channelId ""
:maxDuration ""}})
require "http/client"
url = "{{baseUrl}}/api/debug/helpers/random_filler?channelId=&maxDuration="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/debug/helpers/random_filler?channelId=&maxDuration="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/debug/helpers/random_filler?channelId=&maxDuration=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/debug/helpers/random_filler?channelId=&maxDuration="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/debug/helpers/random_filler?channelId=&maxDuration= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/debug/helpers/random_filler?channelId=&maxDuration=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/debug/helpers/random_filler?channelId=&maxDuration="))
.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}}/api/debug/helpers/random_filler?channelId=&maxDuration=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/debug/helpers/random_filler?channelId=&maxDuration=")
.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}}/api/debug/helpers/random_filler?channelId=&maxDuration=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/debug/helpers/random_filler',
params: {channelId: '', maxDuration: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/debug/helpers/random_filler?channelId=&maxDuration=';
const options = {method: 'GET'};
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}}/api/debug/helpers/random_filler?channelId=&maxDuration=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/debug/helpers/random_filler?channelId=&maxDuration=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/debug/helpers/random_filler?channelId=&maxDuration=',
headers: {}
};
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}}/api/debug/helpers/random_filler',
qs: {channelId: '', maxDuration: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/debug/helpers/random_filler');
req.query({
channelId: '',
maxDuration: ''
});
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}}/api/debug/helpers/random_filler',
params: {channelId: '', maxDuration: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/debug/helpers/random_filler?channelId=&maxDuration=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/debug/helpers/random_filler?channelId=&maxDuration="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/debug/helpers/random_filler?channelId=&maxDuration=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/debug/helpers/random_filler?channelId=&maxDuration=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/debug/helpers/random_filler?channelId=&maxDuration=');
echo $response->getBody();
setUrl('{{baseUrl}}/api/debug/helpers/random_filler');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'channelId' => '',
'maxDuration' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/debug/helpers/random_filler');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'channelId' => '',
'maxDuration' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/debug/helpers/random_filler?channelId=&maxDuration=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/debug/helpers/random_filler?channelId=&maxDuration=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/debug/helpers/random_filler?channelId=&maxDuration=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/debug/helpers/random_filler"
querystring = {"channelId":"","maxDuration":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/debug/helpers/random_filler"
queryString <- list(
channelId = "",
maxDuration = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/debug/helpers/random_filler?channelId=&maxDuration=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/debug/helpers/random_filler') do |req|
req.params['channelId'] = ''
req.params['maxDuration'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/debug/helpers/random_filler";
let querystring = [
("channelId", ""),
("maxDuration", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/api/debug/helpers/random_filler?channelId=&maxDuration='
http GET '{{baseUrl}}/api/debug/helpers/random_filler?channelId=&maxDuration='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/api/debug/helpers/random_filler?channelId=&maxDuration='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/debug/helpers/random_filler?channelId=&maxDuration=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-debug-jellyfin-libraries
{{baseUrl}}/api/debug/jellyfin/libraries
QUERY PARAMS
userId
uri
apiKey
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/debug/jellyfin/libraries" {:query-params {:userId ""
:uri ""
:apiKey ""}})
require "http/client"
url = "{{baseUrl}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/debug/jellyfin/libraries?userId=&uri=&apiKey= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/debug/jellyfin/libraries?userId=&uri=&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}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/debug/jellyfin/libraries?userId=&uri=&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}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/debug/jellyfin/libraries',
params: {userId: '', uri: '', apiKey: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey=';
const options = {method: 'GET'};
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}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/debug/jellyfin/libraries?userId=&uri=&apiKey=',
headers: {}
};
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}}/api/debug/jellyfin/libraries',
qs: {userId: '', uri: '', 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}}/api/debug/jellyfin/libraries');
req.query({
userId: '',
uri: '',
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}}/api/debug/jellyfin/libraries',
params: {userId: '', uri: '', apiKey: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey=');
echo $response->getBody();
setUrl('{{baseUrl}}/api/debug/jellyfin/libraries');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'userId' => '',
'uri' => '',
'apiKey' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/debug/jellyfin/libraries');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'userId' => '',
'uri' => '',
'apiKey' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/debug/jellyfin/libraries?userId=&uri=&apiKey=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/debug/jellyfin/libraries"
querystring = {"userId":"","uri":"","apiKey":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/debug/jellyfin/libraries"
queryString <- list(
userId = "",
uri = "",
apiKey = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/debug/jellyfin/libraries') do |req|
req.params['userId'] = ''
req.params['uri'] = ''
req.params['apiKey'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/debug/jellyfin/libraries";
let querystring = [
("userId", ""),
("uri", ""),
("apiKey", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey='
http GET '{{baseUrl}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/debug/jellyfin/libraries?userId=&uri=&apiKey=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-debug-jellyfin-library-items
{{baseUrl}}/api/debug/jellyfin/library/items
QUERY PARAMS
uri
apiKey
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/debug/jellyfin/library/items?uri=&apiKey=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/debug/jellyfin/library/items" {:query-params {:uri ""
:apiKey ""}})
require "http/client"
url = "{{baseUrl}}/api/debug/jellyfin/library/items?uri=&apiKey="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/debug/jellyfin/library/items?uri=&apiKey="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/debug/jellyfin/library/items?uri=&apiKey=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/debug/jellyfin/library/items?uri=&apiKey="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/debug/jellyfin/library/items?uri=&apiKey= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/debug/jellyfin/library/items?uri=&apiKey=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/debug/jellyfin/library/items?uri=&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}}/api/debug/jellyfin/library/items?uri=&apiKey=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/debug/jellyfin/library/items?uri=&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}}/api/debug/jellyfin/library/items?uri=&apiKey=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/debug/jellyfin/library/items',
params: {uri: '', apiKey: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/debug/jellyfin/library/items?uri=&apiKey=';
const options = {method: 'GET'};
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}}/api/debug/jellyfin/library/items?uri=&apiKey=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/debug/jellyfin/library/items?uri=&apiKey=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/debug/jellyfin/library/items?uri=&apiKey=',
headers: {}
};
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}}/api/debug/jellyfin/library/items',
qs: {uri: '', 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}}/api/debug/jellyfin/library/items');
req.query({
uri: '',
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}}/api/debug/jellyfin/library/items',
params: {uri: '', apiKey: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/debug/jellyfin/library/items?uri=&apiKey=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/debug/jellyfin/library/items?uri=&apiKey="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/debug/jellyfin/library/items?uri=&apiKey=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/debug/jellyfin/library/items?uri=&apiKey=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/debug/jellyfin/library/items?uri=&apiKey=');
echo $response->getBody();
setUrl('{{baseUrl}}/api/debug/jellyfin/library/items');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'uri' => '',
'apiKey' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/debug/jellyfin/library/items');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'uri' => '',
'apiKey' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/debug/jellyfin/library/items?uri=&apiKey=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/debug/jellyfin/library/items?uri=&apiKey=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/debug/jellyfin/library/items?uri=&apiKey=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/debug/jellyfin/library/items"
querystring = {"uri":"","apiKey":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/debug/jellyfin/library/items"
queryString <- list(
uri = "",
apiKey = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/debug/jellyfin/library/items?uri=&apiKey=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/debug/jellyfin/library/items') do |req|
req.params['uri'] = ''
req.params['apiKey'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/debug/jellyfin/library/items";
let querystring = [
("uri", ""),
("apiKey", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/api/debug/jellyfin/library/items?uri=&apiKey='
http GET '{{baseUrl}}/api/debug/jellyfin/library/items?uri=&apiKey='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/api/debug/jellyfin/library/items?uri=&apiKey='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/debug/jellyfin/library/items?uri=&apiKey=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-debug-jellyfin-match_program--id
{{baseUrl}}/api/debug/jellyfin/match_program/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/debug/jellyfin/match_program/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/debug/jellyfin/match_program/:id")
require "http/client"
url = "{{baseUrl}}/api/debug/jellyfin/match_program/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/debug/jellyfin/match_program/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/debug/jellyfin/match_program/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/debug/jellyfin/match_program/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/debug/jellyfin/match_program/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/debug/jellyfin/match_program/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/debug/jellyfin/match_program/:id"))
.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}}/api/debug/jellyfin/match_program/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/debug/jellyfin/match_program/:id")
.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}}/api/debug/jellyfin/match_program/:id');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/debug/jellyfin/match_program/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/debug/jellyfin/match_program/:id';
const options = {method: 'GET'};
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}}/api/debug/jellyfin/match_program/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/debug/jellyfin/match_program/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/debug/jellyfin/match_program/:id',
headers: {}
};
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}}/api/debug/jellyfin/match_program/:id'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/debug/jellyfin/match_program/:id');
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}}/api/debug/jellyfin/match_program/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/debug/jellyfin/match_program/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/debug/jellyfin/match_program/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/debug/jellyfin/match_program/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/debug/jellyfin/match_program/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/debug/jellyfin/match_program/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/debug/jellyfin/match_program/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/debug/jellyfin/match_program/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/debug/jellyfin/match_program/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/debug/jellyfin/match_program/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/debug/jellyfin/match_program/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/debug/jellyfin/match_program/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/debug/jellyfin/match_program/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/debug/jellyfin/match_program/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/debug/jellyfin/match_program/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/debug/jellyfin/match_program/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/debug/jellyfin/match_program/:id
http GET {{baseUrl}}/api/debug/jellyfin/match_program/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/debug/jellyfin/match_program/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/debug/jellyfin/match_program/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-debug-plex-stream_details
{{baseUrl}}/api/debug/plex/stream_details
QUERY PARAMS
key
mediaSource
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/debug/plex/stream_details?key=&mediaSource=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/debug/plex/stream_details" {:query-params {:key ""
:mediaSource ""}})
require "http/client"
url = "{{baseUrl}}/api/debug/plex/stream_details?key=&mediaSource="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/debug/plex/stream_details?key=&mediaSource="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/debug/plex/stream_details?key=&mediaSource=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/debug/plex/stream_details?key=&mediaSource="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/debug/plex/stream_details?key=&mediaSource= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/debug/plex/stream_details?key=&mediaSource=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/debug/plex/stream_details?key=&mediaSource="))
.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}}/api/debug/plex/stream_details?key=&mediaSource=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/debug/plex/stream_details?key=&mediaSource=")
.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}}/api/debug/plex/stream_details?key=&mediaSource=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/debug/plex/stream_details',
params: {key: '', mediaSource: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/debug/plex/stream_details?key=&mediaSource=';
const options = {method: 'GET'};
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}}/api/debug/plex/stream_details?key=&mediaSource=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/debug/plex/stream_details?key=&mediaSource=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/debug/plex/stream_details?key=&mediaSource=',
headers: {}
};
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}}/api/debug/plex/stream_details',
qs: {key: '', mediaSource: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/debug/plex/stream_details');
req.query({
key: '',
mediaSource: ''
});
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}}/api/debug/plex/stream_details',
params: {key: '', mediaSource: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/debug/plex/stream_details?key=&mediaSource=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/debug/plex/stream_details?key=&mediaSource="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/debug/plex/stream_details?key=&mediaSource=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/debug/plex/stream_details?key=&mediaSource=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/debug/plex/stream_details?key=&mediaSource=');
echo $response->getBody();
setUrl('{{baseUrl}}/api/debug/plex/stream_details');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'key' => '',
'mediaSource' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/debug/plex/stream_details');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'key' => '',
'mediaSource' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/debug/plex/stream_details?key=&mediaSource=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/debug/plex/stream_details?key=&mediaSource=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/debug/plex/stream_details?key=&mediaSource=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/debug/plex/stream_details"
querystring = {"key":"","mediaSource":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/debug/plex/stream_details"
queryString <- list(mediaSource = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/debug/plex/stream_details?key=&mediaSource=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/debug/plex/stream_details') do |req|
req.params['key'] = ''
req.params['mediaSource'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/debug/plex/stream_details";
let querystring = [
("key", ""),
("mediaSource", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/api/debug/plex/stream_details?key=&mediaSource='
http GET '{{baseUrl}}/api/debug/plex/stream_details?key=&mediaSource='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/api/debug/plex/stream_details?key=&mediaSource='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/debug/plex/stream_details?key=&mediaSource=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-debug-streams-error
{{baseUrl}}/api/debug/streams/error
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/debug/streams/error");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/debug/streams/error")
require "http/client"
url = "{{baseUrl}}/api/debug/streams/error"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/debug/streams/error"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/debug/streams/error");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/debug/streams/error"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/debug/streams/error HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/debug/streams/error")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/debug/streams/error"))
.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}}/api/debug/streams/error")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/debug/streams/error")
.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}}/api/debug/streams/error');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/debug/streams/error'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/debug/streams/error';
const options = {method: 'GET'};
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}}/api/debug/streams/error',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/debug/streams/error")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/debug/streams/error',
headers: {}
};
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}}/api/debug/streams/error'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/debug/streams/error');
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}}/api/debug/streams/error'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/debug/streams/error';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/debug/streams/error"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/debug/streams/error" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/debug/streams/error",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/debug/streams/error');
echo $response->getBody();
setUrl('{{baseUrl}}/api/debug/streams/error');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/debug/streams/error');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/debug/streams/error' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/debug/streams/error' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/debug/streams/error")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/debug/streams/error"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/debug/streams/error"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/debug/streams/error")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/debug/streams/error') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/debug/streams/error";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/debug/streams/error
http GET {{baseUrl}}/api/debug/streams/error
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/debug/streams/error
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/debug/streams/error")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-debug-streams-offline
{{baseUrl}}/api/debug/streams/offline
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/debug/streams/offline");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/debug/streams/offline")
require "http/client"
url = "{{baseUrl}}/api/debug/streams/offline"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/debug/streams/offline"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/debug/streams/offline");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/debug/streams/offline"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/debug/streams/offline HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/debug/streams/offline")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/debug/streams/offline"))
.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}}/api/debug/streams/offline")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/debug/streams/offline")
.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}}/api/debug/streams/offline');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/debug/streams/offline'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/debug/streams/offline';
const options = {method: 'GET'};
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}}/api/debug/streams/offline',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/debug/streams/offline")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/debug/streams/offline',
headers: {}
};
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}}/api/debug/streams/offline'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/debug/streams/offline');
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}}/api/debug/streams/offline'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/debug/streams/offline';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/debug/streams/offline"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/debug/streams/offline" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/debug/streams/offline",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/debug/streams/offline');
echo $response->getBody();
setUrl('{{baseUrl}}/api/debug/streams/offline');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/debug/streams/offline');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/debug/streams/offline' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/debug/streams/offline' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/debug/streams/offline")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/debug/streams/offline"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/debug/streams/offline"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/debug/streams/offline")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/debug/streams/offline') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/debug/streams/offline";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/debug/streams/offline
http GET {{baseUrl}}/api/debug/streams/offline
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/debug/streams/offline
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/debug/streams/offline")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-debug-streams-programs--id
{{baseUrl}}/api/debug/streams/programs/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/debug/streams/programs/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/debug/streams/programs/:id")
require "http/client"
url = "{{baseUrl}}/api/debug/streams/programs/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/debug/streams/programs/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/debug/streams/programs/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/debug/streams/programs/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/debug/streams/programs/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/debug/streams/programs/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/debug/streams/programs/:id"))
.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}}/api/debug/streams/programs/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/debug/streams/programs/:id")
.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}}/api/debug/streams/programs/:id');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/debug/streams/programs/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/debug/streams/programs/:id';
const options = {method: 'GET'};
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}}/api/debug/streams/programs/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/debug/streams/programs/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/debug/streams/programs/:id',
headers: {}
};
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}}/api/debug/streams/programs/:id'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/debug/streams/programs/:id');
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}}/api/debug/streams/programs/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/debug/streams/programs/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/debug/streams/programs/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/debug/streams/programs/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/debug/streams/programs/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/debug/streams/programs/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/debug/streams/programs/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/debug/streams/programs/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/debug/streams/programs/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/debug/streams/programs/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/debug/streams/programs/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/debug/streams/programs/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/debug/streams/programs/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/debug/streams/programs/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/debug/streams/programs/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/debug/streams/programs/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/debug/streams/programs/:id
http GET {{baseUrl}}/api/debug/streams/programs/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/debug/streams/programs/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/debug/streams/programs/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-guide-debug
{{baseUrl}}/api/guide/debug
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/guide/debug");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/guide/debug")
require "http/client"
url = "{{baseUrl}}/api/guide/debug"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/guide/debug"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/guide/debug");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/guide/debug"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/guide/debug HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/guide/debug")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/guide/debug"))
.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}}/api/guide/debug")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/guide/debug")
.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}}/api/guide/debug');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/guide/debug'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/guide/debug';
const options = {method: 'GET'};
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}}/api/guide/debug',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/guide/debug")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/guide/debug',
headers: {}
};
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}}/api/guide/debug'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/guide/debug');
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}}/api/guide/debug'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/guide/debug';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/guide/debug"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/guide/debug" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/guide/debug",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/guide/debug');
echo $response->getBody();
setUrl('{{baseUrl}}/api/guide/debug');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/guide/debug');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/guide/debug' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/guide/debug' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/guide/debug")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/guide/debug"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/guide/debug"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/guide/debug")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/guide/debug') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/guide/debug";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/guide/debug
http GET {{baseUrl}}/api/guide/debug
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/guide/debug
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/guide/debug")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
post -api-debug-plex--programId-update_external_ids
{{baseUrl}}/api/debug/plex/:programId/update_external_ids
QUERY PARAMS
programId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/debug/plex/:programId/update_external_ids");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/debug/plex/:programId/update_external_ids")
require "http/client"
url = "{{baseUrl}}/api/debug/plex/:programId/update_external_ids"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/api/debug/plex/:programId/update_external_ids"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/debug/plex/:programId/update_external_ids");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/debug/plex/:programId/update_external_ids"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/api/debug/plex/:programId/update_external_ids HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/debug/plex/:programId/update_external_ids")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/debug/plex/:programId/update_external_ids"))
.method("POST", 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}}/api/debug/plex/:programId/update_external_ids")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/debug/plex/:programId/update_external_ids")
.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('POST', '{{baseUrl}}/api/debug/plex/:programId/update_external_ids');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/debug/plex/:programId/update_external_ids'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/debug/plex/:programId/update_external_ids';
const options = {method: 'POST'};
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}}/api/debug/plex/:programId/update_external_ids',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/debug/plex/:programId/update_external_ids")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/debug/plex/:programId/update_external_ids',
headers: {}
};
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: 'POST',
url: '{{baseUrl}}/api/debug/plex/:programId/update_external_ids'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/api/debug/plex/:programId/update_external_ids');
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}}/api/debug/plex/:programId/update_external_ids'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/debug/plex/:programId/update_external_ids';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/debug/plex/:programId/update_external_ids"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/debug/plex/:programId/update_external_ids" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/debug/plex/:programId/update_external_ids",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/debug/plex/:programId/update_external_ids');
echo $response->getBody();
setUrl('{{baseUrl}}/api/debug/plex/:programId/update_external_ids');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/debug/plex/:programId/update_external_ids');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/debug/plex/:programId/update_external_ids' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/debug/plex/:programId/update_external_ids' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/api/debug/plex/:programId/update_external_ids")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/debug/plex/:programId/update_external_ids"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/debug/plex/:programId/update_external_ids"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/debug/plex/:programId/update_external_ids")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/api/debug/plex/:programId/update_external_ids') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/debug/plex/:programId/update_external_ids";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/api/debug/plex/:programId/update_external_ids
http POST {{baseUrl}}/api/debug/plex/:programId/update_external_ids
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/api/debug/plex/:programId/update_external_ids
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/debug/plex/:programId/update_external_ids")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
DELETE
delete -api-filler-lists--id
{{baseUrl}}/api/filler-lists/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/filler-lists/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/api/filler-lists/:id")
require "http/client"
url = "{{baseUrl}}/api/filler-lists/:id"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/api/filler-lists/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/filler-lists/:id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/filler-lists/:id"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/api/filler-lists/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/api/filler-lists/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/filler-lists/:id"))
.method("DELETE", 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}}/api/filler-lists/:id")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/api/filler-lists/:id")
.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('DELETE', '{{baseUrl}}/api/filler-lists/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/api/filler-lists/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/filler-lists/:id';
const options = {method: 'DELETE'};
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}}/api/filler-lists/:id',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/filler-lists/:id")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/filler-lists/:id',
headers: {}
};
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: 'DELETE', url: '{{baseUrl}}/api/filler-lists/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/api/filler-lists/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/api/filler-lists/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/filler-lists/:id';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/filler-lists/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
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}}/api/filler-lists/:id" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/filler-lists/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/api/filler-lists/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/filler-lists/:id');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/filler-lists/:id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/filler-lists/:id' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/filler-lists/:id' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/api/filler-lists/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/filler-lists/:id"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/filler-lists/:id"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/filler-lists/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/api/filler-lists/:id') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/filler-lists/:id";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/api/filler-lists/:id
http DELETE {{baseUrl}}/api/filler-lists/:id
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/api/filler-lists/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/filler-lists/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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
get -api-filler-lists--id-programs
{{baseUrl}}/api/filler-lists/:id/programs
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/filler-lists/:id/programs");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/filler-lists/:id/programs")
require "http/client"
url = "{{baseUrl}}/api/filler-lists/:id/programs"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/filler-lists/:id/programs"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/filler-lists/:id/programs");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/filler-lists/:id/programs"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/filler-lists/:id/programs HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/filler-lists/:id/programs")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/filler-lists/:id/programs"))
.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}}/api/filler-lists/:id/programs")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/filler-lists/:id/programs")
.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}}/api/filler-lists/:id/programs');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/filler-lists/:id/programs'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/filler-lists/:id/programs';
const options = {method: 'GET'};
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}}/api/filler-lists/:id/programs',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/filler-lists/:id/programs")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/filler-lists/:id/programs',
headers: {}
};
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}}/api/filler-lists/:id/programs'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/filler-lists/:id/programs');
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}}/api/filler-lists/:id/programs'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/filler-lists/:id/programs';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/filler-lists/:id/programs"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/filler-lists/:id/programs" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/filler-lists/:id/programs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/filler-lists/:id/programs');
echo $response->getBody();
setUrl('{{baseUrl}}/api/filler-lists/:id/programs');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/filler-lists/:id/programs');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/filler-lists/:id/programs' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/filler-lists/:id/programs' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/filler-lists/:id/programs")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/filler-lists/:id/programs"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/filler-lists/:id/programs"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/filler-lists/:id/programs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/filler-lists/:id/programs') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/filler-lists/:id/programs";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/filler-lists/:id/programs
http GET {{baseUrl}}/api/filler-lists/:id/programs
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/filler-lists/:id/programs
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/filler-lists/:id/programs")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-filler-lists--id
{{baseUrl}}/api/filler-lists/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/filler-lists/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/filler-lists/:id")
require "http/client"
url = "{{baseUrl}}/api/filler-lists/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/filler-lists/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/filler-lists/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/filler-lists/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/filler-lists/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/filler-lists/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/filler-lists/:id"))
.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}}/api/filler-lists/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/filler-lists/:id")
.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}}/api/filler-lists/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/filler-lists/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/filler-lists/:id';
const options = {method: 'GET'};
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}}/api/filler-lists/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/filler-lists/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/filler-lists/:id',
headers: {}
};
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}}/api/filler-lists/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/filler-lists/:id');
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}}/api/filler-lists/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/filler-lists/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/filler-lists/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/filler-lists/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/filler-lists/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/filler-lists/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/filler-lists/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/filler-lists/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/filler-lists/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/filler-lists/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/filler-lists/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/filler-lists/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/filler-lists/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/filler-lists/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/filler-lists/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/filler-lists/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/filler-lists/:id
http GET {{baseUrl}}/api/filler-lists/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/filler-lists/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/filler-lists/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-filler-lists
{{baseUrl}}/api/filler-lists
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/filler-lists");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/filler-lists")
require "http/client"
url = "{{baseUrl}}/api/filler-lists"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/filler-lists"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/filler-lists");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/filler-lists"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/filler-lists HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/filler-lists")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/filler-lists"))
.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}}/api/filler-lists")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/filler-lists")
.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}}/api/filler-lists');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/filler-lists'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/filler-lists';
const options = {method: 'GET'};
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}}/api/filler-lists',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/filler-lists")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/filler-lists',
headers: {}
};
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}}/api/filler-lists'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/filler-lists');
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}}/api/filler-lists'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/filler-lists';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/filler-lists"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/filler-lists" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/filler-lists",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/filler-lists');
echo $response->getBody();
setUrl('{{baseUrl}}/api/filler-lists');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/filler-lists');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/filler-lists' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/filler-lists' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/filler-lists")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/filler-lists"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/filler-lists"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/filler-lists")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/filler-lists') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/filler-lists";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/filler-lists
http GET {{baseUrl}}/api/filler-lists
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/filler-lists
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/filler-lists")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
post -api-filler-lists
{{baseUrl}}/api/filler-lists
BODY json
{
"name": "",
"programs": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/filler-lists");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"name\": \"\",\n \"programs\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/filler-lists" {:content-type :json
:form-params {:name ""
:programs []}})
require "http/client"
url = "{{baseUrl}}/api/filler-lists"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"programs\": []\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}}/api/filler-lists"),
Content = new StringContent("{\n \"name\": \"\",\n \"programs\": []\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}}/api/filler-lists");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"programs\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/filler-lists"
payload := strings.NewReader("{\n \"name\": \"\",\n \"programs\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
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/api/filler-lists HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 34
{
"name": "",
"programs": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/filler-lists")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"programs\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/filler-lists"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"programs\": []\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 \"name\": \"\",\n \"programs\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/filler-lists")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/filler-lists")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"programs\": []\n}")
.asString();
const data = JSON.stringify({
name: '',
programs: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/filler-lists');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/filler-lists',
headers: {'content-type': 'application/json'},
data: {name: '', programs: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/filler-lists';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","programs":[]}'
};
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}}/api/filler-lists',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "programs": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"programs\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/filler-lists")
.post(body)
.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/api/filler-lists',
headers: {
'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({name: '', programs: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/filler-lists',
headers: {'content-type': 'application/json'},
body: {name: '', programs: []},
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}}/api/filler-lists');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
programs: []
});
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}}/api/filler-lists',
headers: {'content-type': 'application/json'},
data: {name: '', programs: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/filler-lists';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","programs":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"name": @"",
@"programs": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/filler-lists"]
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}}/api/filler-lists" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"programs\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/filler-lists",
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([
'name' => '',
'programs' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/filler-lists', [
'body' => '{
"name": "",
"programs": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/filler-lists');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'programs' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'programs' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/api/filler-lists');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/filler-lists' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"programs": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/filler-lists' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"programs": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"programs\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/filler-lists", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/filler-lists"
payload = {
"name": "",
"programs": []
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/filler-lists"
payload <- "{\n \"name\": \"\",\n \"programs\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/filler-lists")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"name\": \"\",\n \"programs\": []\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/api/filler-lists') do |req|
req.body = "{\n \"name\": \"\",\n \"programs\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/filler-lists";
let payload = json!({
"name": "",
"programs": ()
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/api/filler-lists \
--header 'content-type: application/json' \
--data '{
"name": "",
"programs": []
}'
echo '{
"name": "",
"programs": []
}' | \
http POST {{baseUrl}}/api/filler-lists \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "programs": []\n}' \
--output-document \
- {{baseUrl}}/api/filler-lists
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"programs": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/filler-lists")! 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()
PUT
put -api-filler-lists--id
{{baseUrl}}/api/filler-lists/:id
QUERY PARAMS
id
BODY json
{
"name": "",
"programs": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/filler-lists/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"name\": \"\",\n \"programs\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/api/filler-lists/:id" {:content-type :json
:form-params {:name ""
:programs []}})
require "http/client"
url = "{{baseUrl}}/api/filler-lists/:id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"programs\": []\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/api/filler-lists/:id"),
Content = new StringContent("{\n \"name\": \"\",\n \"programs\": []\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}}/api/filler-lists/:id");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"programs\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/filler-lists/:id"
payload := strings.NewReader("{\n \"name\": \"\",\n \"programs\": []\n}")
req, _ := http.NewRequest("PUT", url, payload)
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))
}
PUT /baseUrl/api/filler-lists/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 34
{
"name": "",
"programs": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/api/filler-lists/:id")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"programs\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/filler-lists/:id"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"programs\": []\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 \"name\": \"\",\n \"programs\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/filler-lists/:id")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/api/filler-lists/:id")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"programs\": []\n}")
.asString();
const data = JSON.stringify({
name: '',
programs: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/api/filler-lists/:id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/filler-lists/:id',
headers: {'content-type': 'application/json'},
data: {name: '', programs: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/filler-lists/:id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"name":"","programs":[]}'
};
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}}/api/filler-lists/:id',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "programs": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"programs\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/filler-lists/:id")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/filler-lists/:id',
headers: {
'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({name: '', programs: []}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/filler-lists/:id',
headers: {'content-type': 'application/json'},
body: {name: '', programs: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/api/filler-lists/:id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
programs: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/filler-lists/:id',
headers: {'content-type': 'application/json'},
data: {name: '', programs: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/filler-lists/:id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"name":"","programs":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"name": @"",
@"programs": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/filler-lists/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[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}}/api/filler-lists/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"programs\": []\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/filler-lists/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '',
'programs' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/api/filler-lists/:id', [
'body' => '{
"name": "",
"programs": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/filler-lists/:id');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'programs' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'programs' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/api/filler-lists/:id');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/filler-lists/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"programs": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/filler-lists/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"programs": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"programs\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/api/filler-lists/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/filler-lists/:id"
payload = {
"name": "",
"programs": []
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/filler-lists/:id"
payload <- "{\n \"name\": \"\",\n \"programs\": []\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/filler-lists/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"name\": \"\",\n \"programs\": []\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.put('/baseUrl/api/filler-lists/:id') do |req|
req.body = "{\n \"name\": \"\",\n \"programs\": []\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/filler-lists/:id";
let payload = json!({
"name": "",
"programs": ()
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/api/filler-lists/:id \
--header 'content-type: application/json' \
--data '{
"name": "",
"programs": []
}'
echo '{
"name": "",
"programs": []
}' | \
http PUT {{baseUrl}}/api/filler-lists/:id \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "programs": []\n}' \
--output-document \
- {{baseUrl}}/api/filler-lists/:id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"programs": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/filler-lists/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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
get -api-guide-channels--id
{{baseUrl}}/api/guide/channels/:id
QUERY PARAMS
dateFrom
dateTo
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/guide/channels/:id?dateFrom=&dateTo=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/guide/channels/:id" {:query-params {:dateFrom ""
:dateTo ""}})
require "http/client"
url = "{{baseUrl}}/api/guide/channels/:id?dateFrom=&dateTo="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/guide/channels/:id?dateFrom=&dateTo="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/guide/channels/:id?dateFrom=&dateTo=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/guide/channels/:id?dateFrom=&dateTo="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/guide/channels/:id?dateFrom=&dateTo= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/guide/channels/:id?dateFrom=&dateTo=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/guide/channels/:id?dateFrom=&dateTo="))
.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}}/api/guide/channels/:id?dateFrom=&dateTo=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/guide/channels/:id?dateFrom=&dateTo=")
.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}}/api/guide/channels/:id?dateFrom=&dateTo=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/guide/channels/:id',
params: {dateFrom: '', dateTo: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/guide/channels/:id?dateFrom=&dateTo=';
const options = {method: 'GET'};
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}}/api/guide/channels/:id?dateFrom=&dateTo=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/guide/channels/:id?dateFrom=&dateTo=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/guide/channels/:id?dateFrom=&dateTo=',
headers: {}
};
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}}/api/guide/channels/:id',
qs: {dateFrom: '', dateTo: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/guide/channels/:id');
req.query({
dateFrom: '',
dateTo: ''
});
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}}/api/guide/channels/:id',
params: {dateFrom: '', dateTo: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/guide/channels/:id?dateFrom=&dateTo=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/guide/channels/:id?dateFrom=&dateTo="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/guide/channels/:id?dateFrom=&dateTo=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/guide/channels/:id?dateFrom=&dateTo=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/guide/channels/:id?dateFrom=&dateTo=');
echo $response->getBody();
setUrl('{{baseUrl}}/api/guide/channels/:id');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'dateFrom' => '',
'dateTo' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/guide/channels/:id');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'dateFrom' => '',
'dateTo' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/guide/channels/:id?dateFrom=&dateTo=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/guide/channels/:id?dateFrom=&dateTo=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/guide/channels/:id?dateFrom=&dateTo=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/guide/channels/:id"
querystring = {"dateFrom":"","dateTo":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/guide/channels/:id"
queryString <- list(
dateFrom = "",
dateTo = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/guide/channels/:id?dateFrom=&dateTo=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/guide/channels/:id') do |req|
req.params['dateFrom'] = ''
req.params['dateTo'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/guide/channels/:id";
let querystring = [
("dateFrom", ""),
("dateTo", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/api/guide/channels/:id?dateFrom=&dateTo='
http GET '{{baseUrl}}/api/guide/channels/:id?dateFrom=&dateTo='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/api/guide/channels/:id?dateFrom=&dateTo='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/guide/channels/:id?dateFrom=&dateTo=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-guide-channels
{{baseUrl}}/api/guide/channels
QUERY PARAMS
dateFrom
dateTo
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/guide/channels?dateFrom=&dateTo=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/guide/channels" {:query-params {:dateFrom ""
:dateTo ""}})
require "http/client"
url = "{{baseUrl}}/api/guide/channels?dateFrom=&dateTo="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/guide/channels?dateFrom=&dateTo="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/guide/channels?dateFrom=&dateTo=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/guide/channels?dateFrom=&dateTo="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/guide/channels?dateFrom=&dateTo= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/guide/channels?dateFrom=&dateTo=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/guide/channels?dateFrom=&dateTo="))
.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}}/api/guide/channels?dateFrom=&dateTo=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/guide/channels?dateFrom=&dateTo=")
.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}}/api/guide/channels?dateFrom=&dateTo=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/guide/channels',
params: {dateFrom: '', dateTo: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/guide/channels?dateFrom=&dateTo=';
const options = {method: 'GET'};
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}}/api/guide/channels?dateFrom=&dateTo=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/guide/channels?dateFrom=&dateTo=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/guide/channels?dateFrom=&dateTo=',
headers: {}
};
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}}/api/guide/channels',
qs: {dateFrom: '', dateTo: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/guide/channels');
req.query({
dateFrom: '',
dateTo: ''
});
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}}/api/guide/channels',
params: {dateFrom: '', dateTo: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/guide/channels?dateFrom=&dateTo=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/guide/channels?dateFrom=&dateTo="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/guide/channels?dateFrom=&dateTo=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/guide/channels?dateFrom=&dateTo=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/guide/channels?dateFrom=&dateTo=');
echo $response->getBody();
setUrl('{{baseUrl}}/api/guide/channels');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'dateFrom' => '',
'dateTo' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/guide/channels');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'dateFrom' => '',
'dateTo' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/guide/channels?dateFrom=&dateTo=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/guide/channels?dateFrom=&dateTo=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/guide/channels?dateFrom=&dateTo=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/guide/channels"
querystring = {"dateFrom":"","dateTo":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/guide/channels"
queryString <- list(
dateFrom = "",
dateTo = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/guide/channels?dateFrom=&dateTo=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/guide/channels') do |req|
req.params['dateFrom'] = ''
req.params['dateTo'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/guide/channels";
let querystring = [
("dateFrom", ""),
("dateTo", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/api/guide/channels?dateFrom=&dateTo='
http GET '{{baseUrl}}/api/guide/channels?dateFrom=&dateTo='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/api/guide/channels?dateFrom=&dateTo='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/guide/channels?dateFrom=&dateTo=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-guide-status
{{baseUrl}}/api/guide/status
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/guide/status");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/guide/status")
require "http/client"
url = "{{baseUrl}}/api/guide/status"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/guide/status"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/guide/status");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/guide/status"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/guide/status HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/guide/status")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/guide/status"))
.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}}/api/guide/status")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/guide/status")
.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}}/api/guide/status');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/guide/status'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/guide/status';
const options = {method: 'GET'};
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}}/api/guide/status',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/guide/status")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/guide/status',
headers: {}
};
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}}/api/guide/status'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/guide/status');
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}}/api/guide/status'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/guide/status';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/guide/status"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/guide/status" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/guide/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/guide/status');
echo $response->getBody();
setUrl('{{baseUrl}}/api/guide/status');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/guide/status');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/guide/status' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/guide/status' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/guide/status")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/guide/status"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/guide/status"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/guide/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/guide/status') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/guide/status";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/guide/status
http GET {{baseUrl}}/api/guide/status
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/guide/status
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/guide/status")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
DELETE
delete -api-media-sources--id
{{baseUrl}}/api/media-sources/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/media-sources/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/api/media-sources/:id")
require "http/client"
url = "{{baseUrl}}/api/media-sources/:id"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/api/media-sources/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/media-sources/:id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/media-sources/:id"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/api/media-sources/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/api/media-sources/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/media-sources/:id"))
.method("DELETE", 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}}/api/media-sources/:id")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/api/media-sources/:id")
.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('DELETE', '{{baseUrl}}/api/media-sources/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/api/media-sources/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/media-sources/:id';
const options = {method: 'DELETE'};
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}}/api/media-sources/:id',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/media-sources/:id")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/media-sources/:id',
headers: {}
};
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: 'DELETE', url: '{{baseUrl}}/api/media-sources/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/api/media-sources/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/api/media-sources/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/media-sources/:id';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/media-sources/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
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}}/api/media-sources/:id" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/media-sources/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/api/media-sources/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/media-sources/:id');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/media-sources/:id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/media-sources/:id' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/media-sources/:id' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/api/media-sources/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/media-sources/:id"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/media-sources/:id"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/media-sources/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/api/media-sources/:id') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/media-sources/:id";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/api/media-sources/:id
http DELETE {{baseUrl}}/api/media-sources/:id
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/api/media-sources/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/media-sources/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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
get -api-media-sources--id-status
{{baseUrl}}/api/media-sources/:id/status
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/media-sources/:id/status");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/media-sources/:id/status")
require "http/client"
url = "{{baseUrl}}/api/media-sources/:id/status"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/media-sources/:id/status"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/media-sources/:id/status");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/media-sources/:id/status"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/media-sources/:id/status HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/media-sources/:id/status")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/media-sources/:id/status"))
.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}}/api/media-sources/:id/status")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/media-sources/:id/status")
.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}}/api/media-sources/:id/status');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/media-sources/:id/status'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/media-sources/:id/status';
const options = {method: 'GET'};
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}}/api/media-sources/:id/status',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/media-sources/:id/status")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/media-sources/:id/status',
headers: {}
};
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}}/api/media-sources/:id/status'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/media-sources/:id/status');
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}}/api/media-sources/:id/status'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/media-sources/:id/status';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/media-sources/:id/status"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/media-sources/:id/status" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/media-sources/:id/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/media-sources/:id/status');
echo $response->getBody();
setUrl('{{baseUrl}}/api/media-sources/:id/status');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/media-sources/:id/status');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/media-sources/:id/status' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/media-sources/:id/status' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/media-sources/:id/status")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/media-sources/:id/status"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/media-sources/:id/status"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/media-sources/:id/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/media-sources/:id/status') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/media-sources/:id/status";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/media-sources/:id/status
http GET {{baseUrl}}/api/media-sources/:id/status
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/media-sources/:id/status
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/media-sources/:id/status")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-media-sources
{{baseUrl}}/api/media-sources
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/media-sources");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/media-sources")
require "http/client"
url = "{{baseUrl}}/api/media-sources"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/media-sources"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/media-sources");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/media-sources"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/media-sources HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/media-sources")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/media-sources"))
.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}}/api/media-sources")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/media-sources")
.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}}/api/media-sources');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/media-sources'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/media-sources';
const options = {method: 'GET'};
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}}/api/media-sources',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/media-sources")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/media-sources',
headers: {}
};
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}}/api/media-sources'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/media-sources');
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}}/api/media-sources'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/media-sources';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/media-sources"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/media-sources" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/media-sources",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/media-sources');
echo $response->getBody();
setUrl('{{baseUrl}}/api/media-sources');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/media-sources');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/media-sources' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/media-sources' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/media-sources")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/media-sources"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/media-sources"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/media-sources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/media-sources') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/media-sources";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/media-sources
http GET {{baseUrl}}/api/media-sources
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/media-sources
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/media-sources")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-plex-status
{{baseUrl}}/api/plex/status
QUERY PARAMS
serverName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/plex/status?serverName=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/plex/status" {:query-params {:serverName ""}})
require "http/client"
url = "{{baseUrl}}/api/plex/status?serverName="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/plex/status?serverName="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/plex/status?serverName=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/plex/status?serverName="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/plex/status?serverName= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/plex/status?serverName=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/plex/status?serverName="))
.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}}/api/plex/status?serverName=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/plex/status?serverName=")
.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}}/api/plex/status?serverName=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/plex/status',
params: {serverName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/plex/status?serverName=';
const options = {method: 'GET'};
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}}/api/plex/status?serverName=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/plex/status?serverName=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/plex/status?serverName=',
headers: {}
};
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}}/api/plex/status',
qs: {serverName: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/plex/status');
req.query({
serverName: ''
});
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}}/api/plex/status',
params: {serverName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/plex/status?serverName=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/plex/status?serverName="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/plex/status?serverName=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/plex/status?serverName=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/plex/status?serverName=');
echo $response->getBody();
setUrl('{{baseUrl}}/api/plex/status');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'serverName' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/plex/status');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'serverName' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/plex/status?serverName=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/plex/status?serverName=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/plex/status?serverName=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/plex/status"
querystring = {"serverName":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/plex/status"
queryString <- list(serverName = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/plex/status?serverName=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/plex/status') do |req|
req.params['serverName'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/plex/status";
let querystring = [
("serverName", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/api/plex/status?serverName='
http GET '{{baseUrl}}/api/plex/status?serverName='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/api/plex/status?serverName='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/plex/status?serverName=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
post -api-media-sources-foreignstatus
{{baseUrl}}/api/media-sources/foreignstatus
BODY json
{
"name": "",
"accessToken": "",
"uri": "",
"type": "",
"username": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/media-sources/foreignstatus");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"name\": \"\",\n \"accessToken\": \"\",\n \"uri\": \"\",\n \"type\": \"\",\n \"username\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/media-sources/foreignstatus" {:content-type :json
:form-params {:name ""
:accessToken ""
:uri ""
:type ""
:username ""}})
require "http/client"
url = "{{baseUrl}}/api/media-sources/foreignstatus"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"accessToken\": \"\",\n \"uri\": \"\",\n \"type\": \"\",\n \"username\": \"\"\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}}/api/media-sources/foreignstatus"),
Content = new StringContent("{\n \"name\": \"\",\n \"accessToken\": \"\",\n \"uri\": \"\",\n \"type\": \"\",\n \"username\": \"\"\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}}/api/media-sources/foreignstatus");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"accessToken\": \"\",\n \"uri\": \"\",\n \"type\": \"\",\n \"username\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/media-sources/foreignstatus"
payload := strings.NewReader("{\n \"name\": \"\",\n \"accessToken\": \"\",\n \"uri\": \"\",\n \"type\": \"\",\n \"username\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/api/media-sources/foreignstatus HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 82
{
"name": "",
"accessToken": "",
"uri": "",
"type": "",
"username": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/media-sources/foreignstatus")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"accessToken\": \"\",\n \"uri\": \"\",\n \"type\": \"\",\n \"username\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/media-sources/foreignstatus"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"accessToken\": \"\",\n \"uri\": \"\",\n \"type\": \"\",\n \"username\": \"\"\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 \"name\": \"\",\n \"accessToken\": \"\",\n \"uri\": \"\",\n \"type\": \"\",\n \"username\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/media-sources/foreignstatus")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/media-sources/foreignstatus")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"accessToken\": \"\",\n \"uri\": \"\",\n \"type\": \"\",\n \"username\": \"\"\n}")
.asString();
const data = JSON.stringify({
name: '',
accessToken: '',
uri: '',
type: '',
username: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/media-sources/foreignstatus');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/media-sources/foreignstatus',
headers: {'content-type': 'application/json'},
data: {name: '', accessToken: '', uri: '', type: '', username: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/media-sources/foreignstatus';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","accessToken":"","uri":"","type":"","username":""}'
};
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}}/api/media-sources/foreignstatus',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "accessToken": "",\n "uri": "",\n "type": "",\n "username": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"accessToken\": \"\",\n \"uri\": \"\",\n \"type\": \"\",\n \"username\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/media-sources/foreignstatus")
.post(body)
.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/api/media-sources/foreignstatus',
headers: {
'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({name: '', accessToken: '', uri: '', type: '', username: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/media-sources/foreignstatus',
headers: {'content-type': 'application/json'},
body: {name: '', accessToken: '', uri: '', type: '', username: ''},
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}}/api/media-sources/foreignstatus');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
accessToken: '',
uri: '',
type: '',
username: ''
});
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}}/api/media-sources/foreignstatus',
headers: {'content-type': 'application/json'},
data: {name: '', accessToken: '', uri: '', type: '', username: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/media-sources/foreignstatus';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","accessToken":"","uri":"","type":"","username":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"name": @"",
@"accessToken": @"",
@"uri": @"",
@"type": @"",
@"username": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/media-sources/foreignstatus"]
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}}/api/media-sources/foreignstatus" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"accessToken\": \"\",\n \"uri\": \"\",\n \"type\": \"\",\n \"username\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/media-sources/foreignstatus",
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([
'name' => '',
'accessToken' => '',
'uri' => '',
'type' => '',
'username' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/media-sources/foreignstatus', [
'body' => '{
"name": "",
"accessToken": "",
"uri": "",
"type": "",
"username": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/media-sources/foreignstatus');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'accessToken' => '',
'uri' => '',
'type' => '',
'username' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'accessToken' => '',
'uri' => '',
'type' => '',
'username' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/media-sources/foreignstatus');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/media-sources/foreignstatus' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"accessToken": "",
"uri": "",
"type": "",
"username": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/media-sources/foreignstatus' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"accessToken": "",
"uri": "",
"type": "",
"username": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"accessToken\": \"\",\n \"uri\": \"\",\n \"type\": \"\",\n \"username\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/media-sources/foreignstatus", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/media-sources/foreignstatus"
payload = {
"name": "",
"accessToken": "",
"uri": "",
"type": "",
"username": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/media-sources/foreignstatus"
payload <- "{\n \"name\": \"\",\n \"accessToken\": \"\",\n \"uri\": \"\",\n \"type\": \"\",\n \"username\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/media-sources/foreignstatus")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"name\": \"\",\n \"accessToken\": \"\",\n \"uri\": \"\",\n \"type\": \"\",\n \"username\": \"\"\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/api/media-sources/foreignstatus') do |req|
req.body = "{\n \"name\": \"\",\n \"accessToken\": \"\",\n \"uri\": \"\",\n \"type\": \"\",\n \"username\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/media-sources/foreignstatus";
let payload = json!({
"name": "",
"accessToken": "",
"uri": "",
"type": "",
"username": ""
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/api/media-sources/foreignstatus \
--header 'content-type: application/json' \
--data '{
"name": "",
"accessToken": "",
"uri": "",
"type": "",
"username": ""
}'
echo '{
"name": "",
"accessToken": "",
"uri": "",
"type": "",
"username": ""
}' | \
http POST {{baseUrl}}/api/media-sources/foreignstatus \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "accessToken": "",\n "uri": "",\n "type": "",\n "username": ""\n}' \
--output-document \
- {{baseUrl}}/api/media-sources/foreignstatus
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"accessToken": "",
"uri": "",
"type": "",
"username": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/media-sources/foreignstatus")! 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
post -api-media-sources
{{baseUrl}}/api/media-sources
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/media-sources");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/media-sources")
require "http/client"
url = "{{baseUrl}}/api/media-sources"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/api/media-sources"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/media-sources");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/media-sources"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/api/media-sources HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/media-sources")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/media-sources"))
.method("POST", 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}}/api/media-sources")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/media-sources")
.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('POST', '{{baseUrl}}/api/media-sources');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/api/media-sources'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/media-sources';
const options = {method: 'POST'};
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}}/api/media-sources',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/media-sources")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/media-sources',
headers: {}
};
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: 'POST', url: '{{baseUrl}}/api/media-sources'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/api/media-sources');
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}}/api/media-sources'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/media-sources';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/media-sources"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/media-sources" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/media-sources",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/media-sources');
echo $response->getBody();
setUrl('{{baseUrl}}/api/media-sources');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/media-sources');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/media-sources' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/media-sources' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/api/media-sources")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/media-sources"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/media-sources"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/media-sources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/api/media-sources') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/media-sources";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/api/media-sources
http POST {{baseUrl}}/api/media-sources
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/api/media-sources
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/media-sources")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
PUT
put -api-media-sources--id
{{baseUrl}}/api/media-sources/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/media-sources/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/api/media-sources/:id")
require "http/client"
url = "{{baseUrl}}/api/media-sources/:id"
response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/api/media-sources/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/media-sources/:id");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/media-sources/:id"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/api/media-sources/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/api/media-sources/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/media-sources/:id"))
.method("PUT", 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}}/api/media-sources/:id")
.put(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/api/media-sources/:id")
.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('PUT', '{{baseUrl}}/api/media-sources/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'PUT', url: '{{baseUrl}}/api/media-sources/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/media-sources/:id';
const options = {method: 'PUT'};
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}}/api/media-sources/:id',
method: 'PUT',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/media-sources/:id")
.put(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/media-sources/:id',
headers: {}
};
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: 'PUT', url: '{{baseUrl}}/api/media-sources/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/api/media-sources/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'PUT', url: '{{baseUrl}}/api/media-sources/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/media-sources/:id';
const options = {method: 'PUT'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/media-sources/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
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}}/api/media-sources/:id" in
Client.call `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/media-sources/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/api/media-sources/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/media-sources/:id');
$request->setMethod(HTTP_METH_PUT);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/media-sources/:id');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/media-sources/:id' -Method PUT
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/media-sources/:id' -Method PUT
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("PUT", "/baseUrl/api/media-sources/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/media-sources/:id"
response = requests.put(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/media-sources/:id"
response <- VERB("PUT", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/media-sources/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.put('/baseUrl/api/media-sources/:id') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/media-sources/:id";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/api/media-sources/:id
http PUT {{baseUrl}}/api/media-sources/:id
wget --quiet \
--method PUT \
--output-document \
- {{baseUrl}}/api/media-sources/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/media-sources/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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
batchGetProgramsByExternalIds
{{baseUrl}}/api/programming/batch/lookup
BODY json
{
"externalIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/programming/batch/lookup");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"externalIds\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/programming/batch/lookup" {:content-type :json
:form-params {:externalIds []}})
require "http/client"
url = "{{baseUrl}}/api/programming/batch/lookup"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"externalIds\": []\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}}/api/programming/batch/lookup"),
Content = new StringContent("{\n \"externalIds\": []\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}}/api/programming/batch/lookup");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"externalIds\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/programming/batch/lookup"
payload := strings.NewReader("{\n \"externalIds\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
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/api/programming/batch/lookup HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 23
{
"externalIds": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/programming/batch/lookup")
.setHeader("content-type", "application/json")
.setBody("{\n \"externalIds\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/programming/batch/lookup"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"externalIds\": []\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 \"externalIds\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/programming/batch/lookup")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/programming/batch/lookup")
.header("content-type", "application/json")
.body("{\n \"externalIds\": []\n}")
.asString();
const data = JSON.stringify({
externalIds: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/programming/batch/lookup');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/programming/batch/lookup',
headers: {'content-type': 'application/json'},
data: {externalIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/programming/batch/lookup';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"externalIds":[]}'
};
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}}/api/programming/batch/lookup',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "externalIds": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"externalIds\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/programming/batch/lookup")
.post(body)
.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/api/programming/batch/lookup',
headers: {
'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({externalIds: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/programming/batch/lookup',
headers: {'content-type': 'application/json'},
body: {externalIds: []},
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}}/api/programming/batch/lookup');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
externalIds: []
});
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}}/api/programming/batch/lookup',
headers: {'content-type': 'application/json'},
data: {externalIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/programming/batch/lookup';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"externalIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"externalIds": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/programming/batch/lookup"]
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}}/api/programming/batch/lookup" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"externalIds\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/programming/batch/lookup",
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([
'externalIds' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/programming/batch/lookup', [
'body' => '{
"externalIds": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/programming/batch/lookup');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'externalIds' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'externalIds' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/api/programming/batch/lookup');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/programming/batch/lookup' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"externalIds": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/programming/batch/lookup' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"externalIds": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"externalIds\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/programming/batch/lookup", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/programming/batch/lookup"
payload = { "externalIds": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/programming/batch/lookup"
payload <- "{\n \"externalIds\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/programming/batch/lookup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"externalIds\": []\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/api/programming/batch/lookup') do |req|
req.body = "{\n \"externalIds\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/programming/batch/lookup";
let payload = json!({"externalIds": ()});
let mut headers = reqwest::header::HeaderMap::new();
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}}/api/programming/batch/lookup \
--header 'content-type: application/json' \
--data '{
"externalIds": []
}'
echo '{
"externalIds": []
}' | \
http POST {{baseUrl}}/api/programming/batch/lookup \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "externalIds": []\n}' \
--output-document \
- {{baseUrl}}/api/programming/batch/lookup
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["externalIds": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/programming/batch/lookup")! 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
get -api-programming-seasons--id
{{baseUrl}}/api/programming/seasons/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/programming/seasons/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/programming/seasons/:id")
require "http/client"
url = "{{baseUrl}}/api/programming/seasons/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/programming/seasons/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/programming/seasons/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/programming/seasons/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/programming/seasons/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/programming/seasons/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/programming/seasons/:id"))
.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}}/api/programming/seasons/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/programming/seasons/:id")
.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}}/api/programming/seasons/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/programming/seasons/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/programming/seasons/:id';
const options = {method: 'GET'};
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}}/api/programming/seasons/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/programming/seasons/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/programming/seasons/:id',
headers: {}
};
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}}/api/programming/seasons/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/programming/seasons/:id');
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}}/api/programming/seasons/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/programming/seasons/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/programming/seasons/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/programming/seasons/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/programming/seasons/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/programming/seasons/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/programming/seasons/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/programming/seasons/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/programming/seasons/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/programming/seasons/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/programming/seasons/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/programming/seasons/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/programming/seasons/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/programming/seasons/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/programming/seasons/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/programming/seasons/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/programming/seasons/:id
http GET {{baseUrl}}/api/programming/seasons/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/programming/seasons/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/programming/seasons/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-programming-shows--id-seasons
{{baseUrl}}/api/programming/shows/:id/seasons
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/programming/shows/:id/seasons");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/programming/shows/:id/seasons")
require "http/client"
url = "{{baseUrl}}/api/programming/shows/:id/seasons"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/programming/shows/:id/seasons"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/programming/shows/:id/seasons");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/programming/shows/:id/seasons"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/programming/shows/:id/seasons HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/programming/shows/:id/seasons")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/programming/shows/:id/seasons"))
.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}}/api/programming/shows/:id/seasons")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/programming/shows/:id/seasons")
.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}}/api/programming/shows/:id/seasons');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/programming/shows/:id/seasons'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/programming/shows/:id/seasons';
const options = {method: 'GET'};
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}}/api/programming/shows/:id/seasons',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/programming/shows/:id/seasons")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/programming/shows/:id/seasons',
headers: {}
};
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}}/api/programming/shows/:id/seasons'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/programming/shows/:id/seasons');
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}}/api/programming/shows/:id/seasons'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/programming/shows/:id/seasons';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/programming/shows/:id/seasons"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/programming/shows/:id/seasons" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/programming/shows/:id/seasons",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/programming/shows/:id/seasons');
echo $response->getBody();
setUrl('{{baseUrl}}/api/programming/shows/:id/seasons');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/programming/shows/:id/seasons');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/programming/shows/:id/seasons' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/programming/shows/:id/seasons' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/programming/shows/:id/seasons")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/programming/shows/:id/seasons"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/programming/shows/:id/seasons"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/programming/shows/:id/seasons")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/programming/shows/:id/seasons') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/programming/shows/:id/seasons";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/programming/shows/:id/seasons
http GET {{baseUrl}}/api/programming/shows/:id/seasons
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/programming/shows/:id/seasons
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/programming/shows/:id/seasons")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-programming-shows--id
{{baseUrl}}/api/programming/shows/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/programming/shows/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/programming/shows/:id")
require "http/client"
url = "{{baseUrl}}/api/programming/shows/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/programming/shows/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/programming/shows/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/programming/shows/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/programming/shows/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/programming/shows/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/programming/shows/:id"))
.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}}/api/programming/shows/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/programming/shows/:id")
.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}}/api/programming/shows/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/programming/shows/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/programming/shows/:id';
const options = {method: 'GET'};
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}}/api/programming/shows/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/programming/shows/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/programming/shows/:id',
headers: {}
};
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}}/api/programming/shows/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/programming/shows/:id');
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}}/api/programming/shows/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/programming/shows/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/programming/shows/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/programming/shows/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/programming/shows/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/programming/shows/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/programming/shows/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/programming/shows/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/programming/shows/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/programming/shows/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/programming/shows/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/programming/shows/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/programming/shows/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/programming/shows/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/programming/shows/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/programming/shows/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/programming/shows/:id
http GET {{baseUrl}}/api/programming/shows/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/programming/shows/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/programming/shows/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-programs--id-external-link
{{baseUrl}}/api/programs/:id/external-link
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/programs/:id/external-link");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/programs/:id/external-link")
require "http/client"
url = "{{baseUrl}}/api/programs/:id/external-link"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/programs/:id/external-link"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/programs/:id/external-link");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/programs/:id/external-link"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/programs/:id/external-link HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/programs/:id/external-link")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/programs/:id/external-link"))
.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}}/api/programs/:id/external-link")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/programs/:id/external-link")
.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}}/api/programs/:id/external-link');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/programs/:id/external-link'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/programs/:id/external-link';
const options = {method: 'GET'};
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}}/api/programs/:id/external-link',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/programs/:id/external-link")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/programs/:id/external-link',
headers: {}
};
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}}/api/programs/:id/external-link'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/programs/:id/external-link');
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}}/api/programs/:id/external-link'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/programs/:id/external-link';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/programs/:id/external-link"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/programs/:id/external-link" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/programs/:id/external-link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/programs/:id/external-link');
echo $response->getBody();
setUrl('{{baseUrl}}/api/programs/:id/external-link');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/programs/:id/external-link');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/programs/:id/external-link' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/programs/:id/external-link' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/programs/:id/external-link")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/programs/:id/external-link"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/programs/:id/external-link"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/programs/:id/external-link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/programs/:id/external-link') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/programs/:id/external-link";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/programs/:id/external-link
http GET {{baseUrl}}/api/programs/:id/external-link
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/programs/:id/external-link
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/programs/:id/external-link")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-programs--id-thumb
{{baseUrl}}/api/programs/:id/thumb
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/programs/:id/thumb");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/programs/:id/thumb")
require "http/client"
url = "{{baseUrl}}/api/programs/:id/thumb"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/programs/:id/thumb"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/programs/:id/thumb");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/programs/:id/thumb"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/programs/:id/thumb HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/programs/:id/thumb")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/programs/:id/thumb"))
.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}}/api/programs/:id/thumb")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/programs/:id/thumb")
.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}}/api/programs/:id/thumb');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/programs/:id/thumb'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/programs/:id/thumb';
const options = {method: 'GET'};
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}}/api/programs/:id/thumb',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/programs/:id/thumb")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/programs/:id/thumb',
headers: {}
};
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}}/api/programs/:id/thumb'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/programs/:id/thumb');
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}}/api/programs/:id/thumb'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/programs/:id/thumb';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/programs/:id/thumb"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/programs/:id/thumb" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/programs/:id/thumb",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/programs/:id/thumb');
echo $response->getBody();
setUrl('{{baseUrl}}/api/programs/:id/thumb');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/programs/:id/thumb');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/programs/:id/thumb' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/programs/:id/thumb' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/programs/:id/thumb")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/programs/:id/thumb"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/programs/:id/thumb"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/programs/:id/thumb")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/programs/:id/thumb') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/programs/:id/thumb";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/programs/:id/thumb
http GET {{baseUrl}}/api/programs/:id/thumb
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/programs/:id/thumb
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/programs/:id/thumb")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-programs--id
{{baseUrl}}/api/programs/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/programs/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/programs/:id")
require "http/client"
url = "{{baseUrl}}/api/programs/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/programs/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/programs/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/programs/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/programs/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/programs/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/programs/:id"))
.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}}/api/programs/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/programs/:id")
.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}}/api/programs/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/programs/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/programs/:id';
const options = {method: 'GET'};
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}}/api/programs/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/programs/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/programs/:id',
headers: {}
};
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}}/api/programs/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/programs/:id');
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}}/api/programs/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/programs/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/programs/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/programs/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/programs/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/programs/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/programs/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/programs/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/programs/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/programs/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/programs/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/programs/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/programs/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/programs/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/programs/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/programs/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/programs/:id
http GET {{baseUrl}}/api/programs/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/programs/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/programs/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
getProgramByExternalId
{{baseUrl}}/api/programming/:externalId
QUERY PARAMS
externalId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/programming/:externalId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/programming/:externalId")
require "http/client"
url = "{{baseUrl}}/api/programming/:externalId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/programming/:externalId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/programming/:externalId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/programming/:externalId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/programming/:externalId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/programming/:externalId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/programming/:externalId"))
.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}}/api/programming/:externalId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/programming/:externalId")
.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}}/api/programming/:externalId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/programming/:externalId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/programming/:externalId';
const options = {method: 'GET'};
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}}/api/programming/:externalId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/programming/:externalId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/programming/:externalId',
headers: {}
};
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}}/api/programming/:externalId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/programming/:externalId');
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}}/api/programming/:externalId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/programming/:externalId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/programming/:externalId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/programming/:externalId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/programming/:externalId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/programming/:externalId');
echo $response->getBody();
setUrl('{{baseUrl}}/api/programming/:externalId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/programming/:externalId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/programming/:externalId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/programming/:externalId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/programming/:externalId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/programming/:externalId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/programming/:externalId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/programming/:externalId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/programming/:externalId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/programming/:externalId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/programming/:externalId
http GET {{baseUrl}}/api/programming/:externalId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/programming/:externalId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/programming/:externalId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
DELETE
delete -api-channels--id-sessions
{{baseUrl}}/api/channels/:id/sessions
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/channels/:id/sessions");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/api/channels/:id/sessions")
require "http/client"
url = "{{baseUrl}}/api/channels/:id/sessions"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/api/channels/:id/sessions"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/channels/:id/sessions");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/channels/:id/sessions"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/api/channels/:id/sessions HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/api/channels/:id/sessions")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/channels/:id/sessions"))
.method("DELETE", 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}}/api/channels/:id/sessions")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/api/channels/:id/sessions")
.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('DELETE', '{{baseUrl}}/api/channels/:id/sessions');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/api/channels/:id/sessions'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/channels/:id/sessions';
const options = {method: 'DELETE'};
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}}/api/channels/:id/sessions',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/channels/:id/sessions")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/channels/:id/sessions',
headers: {}
};
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: 'DELETE', url: '{{baseUrl}}/api/channels/:id/sessions'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/api/channels/:id/sessions');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/api/channels/:id/sessions'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/channels/:id/sessions';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/channels/:id/sessions"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
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}}/api/channels/:id/sessions" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/channels/:id/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/api/channels/:id/sessions');
echo $response->getBody();
setUrl('{{baseUrl}}/api/channels/:id/sessions');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/channels/:id/sessions');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/channels/:id/sessions' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/channels/:id/sessions' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/api/channels/:id/sessions")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/channels/:id/sessions"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/channels/:id/sessions"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/channels/:id/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/api/channels/:id/sessions') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/channels/:id/sessions";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/api/channels/:id/sessions
http DELETE {{baseUrl}}/api/channels/:id/sessions
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/api/channels/:id/sessions
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/channels/:id/sessions")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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
get -api-channels--id-sessions
{{baseUrl}}/api/channels/:id/sessions
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/channels/:id/sessions");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/channels/:id/sessions")
require "http/client"
url = "{{baseUrl}}/api/channels/:id/sessions"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/channels/:id/sessions"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/channels/:id/sessions");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/channels/:id/sessions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/channels/:id/sessions HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/channels/:id/sessions")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/channels/:id/sessions"))
.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}}/api/channels/:id/sessions")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/channels/:id/sessions")
.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}}/api/channels/:id/sessions');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/channels/:id/sessions'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/channels/:id/sessions';
const options = {method: 'GET'};
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}}/api/channels/:id/sessions',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/channels/:id/sessions")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/channels/:id/sessions',
headers: {}
};
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}}/api/channels/:id/sessions'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/channels/:id/sessions');
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}}/api/channels/:id/sessions'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/channels/:id/sessions';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/channels/:id/sessions"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/channels/:id/sessions" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/channels/:id/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/channels/:id/sessions');
echo $response->getBody();
setUrl('{{baseUrl}}/api/channels/:id/sessions');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/channels/:id/sessions');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/channels/:id/sessions' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/channels/:id/sessions' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/channels/:id/sessions")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/channels/:id/sessions"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/channels/:id/sessions"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/channels/:id/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/channels/:id/sessions') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/channels/:id/sessions";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/channels/:id/sessions
http GET {{baseUrl}}/api/channels/:id/sessions
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/channels/:id/sessions
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/channels/:id/sessions")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-sessions
{{baseUrl}}/api/sessions
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/sessions");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/sessions")
require "http/client"
url = "{{baseUrl}}/api/sessions"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/sessions"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/sessions");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/sessions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/sessions HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/sessions")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/sessions"))
.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}}/api/sessions")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/sessions")
.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}}/api/sessions');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/sessions'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/sessions';
const options = {method: 'GET'};
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}}/api/sessions',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/sessions")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/sessions',
headers: {}
};
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}}/api/sessions'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/sessions');
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}}/api/sessions'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/sessions';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/sessions"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/sessions" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/sessions');
echo $response->getBody();
setUrl('{{baseUrl}}/api/sessions');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/sessions');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/sessions' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/sessions' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/sessions")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/sessions"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/sessions"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/sessions') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/sessions";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/sessions
http GET {{baseUrl}}/api/sessions
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/sessions
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/sessions")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
DELETE
delete -api-transcode_configs--id
{{baseUrl}}/api/transcode_configs/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/transcode_configs/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/api/transcode_configs/:id")
require "http/client"
url = "{{baseUrl}}/api/transcode_configs/:id"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/api/transcode_configs/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/transcode_configs/:id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/transcode_configs/:id"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/api/transcode_configs/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/api/transcode_configs/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/transcode_configs/:id"))
.method("DELETE", 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}}/api/transcode_configs/:id")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/api/transcode_configs/:id")
.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('DELETE', '{{baseUrl}}/api/transcode_configs/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/api/transcode_configs/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/transcode_configs/:id';
const options = {method: 'DELETE'};
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}}/api/transcode_configs/:id',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/transcode_configs/:id")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/transcode_configs/:id',
headers: {}
};
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: 'DELETE', url: '{{baseUrl}}/api/transcode_configs/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/api/transcode_configs/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/api/transcode_configs/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/transcode_configs/:id';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/transcode_configs/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
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}}/api/transcode_configs/:id" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/transcode_configs/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/api/transcode_configs/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/transcode_configs/:id');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/transcode_configs/:id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/transcode_configs/:id' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/transcode_configs/:id' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/api/transcode_configs/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/transcode_configs/:id"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/transcode_configs/:id"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/transcode_configs/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/api/transcode_configs/:id') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/transcode_configs/:id";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/api/transcode_configs/:id
http DELETE {{baseUrl}}/api/transcode_configs/:id
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/api/transcode_configs/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/transcode_configs/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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
get -api-ffmpeg-settings
{{baseUrl}}/api/ffmpeg-settings
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/ffmpeg-settings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/ffmpeg-settings")
require "http/client"
url = "{{baseUrl}}/api/ffmpeg-settings"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/ffmpeg-settings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/ffmpeg-settings");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/ffmpeg-settings"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/ffmpeg-settings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/ffmpeg-settings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/ffmpeg-settings"))
.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}}/api/ffmpeg-settings")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/ffmpeg-settings")
.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}}/api/ffmpeg-settings');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/ffmpeg-settings'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/ffmpeg-settings';
const options = {method: 'GET'};
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}}/api/ffmpeg-settings',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/ffmpeg-settings")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/ffmpeg-settings',
headers: {}
};
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}}/api/ffmpeg-settings'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/ffmpeg-settings');
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}}/api/ffmpeg-settings'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/ffmpeg-settings';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/ffmpeg-settings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/ffmpeg-settings" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/ffmpeg-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/ffmpeg-settings');
echo $response->getBody();
setUrl('{{baseUrl}}/api/ffmpeg-settings');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/ffmpeg-settings');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/ffmpeg-settings' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/ffmpeg-settings' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/ffmpeg-settings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/ffmpeg-settings"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/ffmpeg-settings"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/ffmpeg-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/ffmpeg-settings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/ffmpeg-settings";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/ffmpeg-settings
http GET {{baseUrl}}/api/ffmpeg-settings
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/ffmpeg-settings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/ffmpeg-settings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-hdhr-settings
{{baseUrl}}/api/hdhr-settings
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/hdhr-settings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/hdhr-settings")
require "http/client"
url = "{{baseUrl}}/api/hdhr-settings"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/hdhr-settings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/hdhr-settings");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/hdhr-settings"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/hdhr-settings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/hdhr-settings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/hdhr-settings"))
.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}}/api/hdhr-settings")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/hdhr-settings")
.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}}/api/hdhr-settings');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/hdhr-settings'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/hdhr-settings';
const options = {method: 'GET'};
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}}/api/hdhr-settings',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/hdhr-settings")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/hdhr-settings',
headers: {}
};
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}}/api/hdhr-settings'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/hdhr-settings');
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}}/api/hdhr-settings'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/hdhr-settings';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/hdhr-settings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/hdhr-settings" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/hdhr-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/hdhr-settings');
echo $response->getBody();
setUrl('{{baseUrl}}/api/hdhr-settings');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/hdhr-settings');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/hdhr-settings' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/hdhr-settings' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/hdhr-settings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/hdhr-settings"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/hdhr-settings"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/hdhr-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/hdhr-settings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/hdhr-settings";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/hdhr-settings
http GET {{baseUrl}}/api/hdhr-settings
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/hdhr-settings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/hdhr-settings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-plex-settings
{{baseUrl}}/api/plex-settings
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/plex-settings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/plex-settings")
require "http/client"
url = "{{baseUrl}}/api/plex-settings"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/plex-settings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/plex-settings");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/plex-settings"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/plex-settings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/plex-settings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/plex-settings"))
.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}}/api/plex-settings")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/plex-settings")
.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}}/api/plex-settings');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/plex-settings'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/plex-settings';
const options = {method: 'GET'};
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}}/api/plex-settings',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/plex-settings")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/plex-settings',
headers: {}
};
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}}/api/plex-settings'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/plex-settings');
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}}/api/plex-settings'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/plex-settings';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/plex-settings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/plex-settings" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/plex-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/plex-settings');
echo $response->getBody();
setUrl('{{baseUrl}}/api/plex-settings');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/plex-settings');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/plex-settings' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/plex-settings' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/plex-settings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/plex-settings"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/plex-settings"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/plex-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/plex-settings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/plex-settings";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/plex-settings
http GET {{baseUrl}}/api/plex-settings
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/plex-settings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/plex-settings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-transcode_configs--id
{{baseUrl}}/api/transcode_configs/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/transcode_configs/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/transcode_configs/:id")
require "http/client"
url = "{{baseUrl}}/api/transcode_configs/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/transcode_configs/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/transcode_configs/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/transcode_configs/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/transcode_configs/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/transcode_configs/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/transcode_configs/:id"))
.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}}/api/transcode_configs/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/transcode_configs/:id")
.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}}/api/transcode_configs/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/transcode_configs/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/transcode_configs/:id';
const options = {method: 'GET'};
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}}/api/transcode_configs/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/transcode_configs/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/transcode_configs/:id',
headers: {}
};
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}}/api/transcode_configs/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/transcode_configs/:id');
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}}/api/transcode_configs/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/transcode_configs/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/transcode_configs/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/transcode_configs/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/transcode_configs/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/transcode_configs/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/transcode_configs/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/transcode_configs/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/transcode_configs/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/transcode_configs/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/transcode_configs/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/transcode_configs/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/transcode_configs/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/transcode_configs/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/transcode_configs/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/transcode_configs/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/transcode_configs/:id
http GET {{baseUrl}}/api/transcode_configs/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/transcode_configs/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/transcode_configs/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-transcode_configs
{{baseUrl}}/api/transcode_configs
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/transcode_configs");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/transcode_configs")
require "http/client"
url = "{{baseUrl}}/api/transcode_configs"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/transcode_configs"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/transcode_configs");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/transcode_configs"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/transcode_configs HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/transcode_configs")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/transcode_configs"))
.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}}/api/transcode_configs")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/transcode_configs")
.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}}/api/transcode_configs');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/transcode_configs'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/transcode_configs';
const options = {method: 'GET'};
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}}/api/transcode_configs',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/transcode_configs")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/transcode_configs',
headers: {}
};
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}}/api/transcode_configs'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/transcode_configs');
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}}/api/transcode_configs'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/transcode_configs';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/transcode_configs"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/transcode_configs" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/transcode_configs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/transcode_configs');
echo $response->getBody();
setUrl('{{baseUrl}}/api/transcode_configs');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/transcode_configs');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/transcode_configs' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/transcode_configs' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/transcode_configs")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/transcode_configs"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/transcode_configs"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/transcode_configs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/transcode_configs') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/transcode_configs";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/transcode_configs
http GET {{baseUrl}}/api/transcode_configs
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/transcode_configs
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/transcode_configs")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-xmltv-settings
{{baseUrl}}/api/xmltv-settings
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/xmltv-settings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/xmltv-settings")
require "http/client"
url = "{{baseUrl}}/api/xmltv-settings"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/xmltv-settings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/xmltv-settings");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/xmltv-settings"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/xmltv-settings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/xmltv-settings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/xmltv-settings"))
.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}}/api/xmltv-settings")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/xmltv-settings")
.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}}/api/xmltv-settings');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/xmltv-settings'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/xmltv-settings';
const options = {method: 'GET'};
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}}/api/xmltv-settings',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/xmltv-settings")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/xmltv-settings',
headers: {}
};
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}}/api/xmltv-settings'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/xmltv-settings');
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}}/api/xmltv-settings'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/xmltv-settings';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/xmltv-settings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/xmltv-settings" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/xmltv-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/xmltv-settings');
echo $response->getBody();
setUrl('{{baseUrl}}/api/xmltv-settings');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/xmltv-settings');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/xmltv-settings' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/xmltv-settings' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/xmltv-settings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/xmltv-settings"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/xmltv-settings"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/xmltv-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/xmltv-settings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/xmltv-settings";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/xmltv-settings
http GET {{baseUrl}}/api/xmltv-settings
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/xmltv-settings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/xmltv-settings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
post -api-ffmpeg-settings
{{baseUrl}}/api/ffmpeg-settings
BODY json
{
"ffmpegPath": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/ffmpeg-settings");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"ffmpegPath\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/ffmpeg-settings" {:content-type :json
:form-params {:ffmpegPath ""}})
require "http/client"
url = "{{baseUrl}}/api/ffmpeg-settings"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"ffmpegPath\": \"\"\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}}/api/ffmpeg-settings"),
Content = new StringContent("{\n \"ffmpegPath\": \"\"\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}}/api/ffmpeg-settings");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ffmpegPath\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/ffmpeg-settings"
payload := strings.NewReader("{\n \"ffmpegPath\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/api/ffmpeg-settings HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 22
{
"ffmpegPath": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/ffmpeg-settings")
.setHeader("content-type", "application/json")
.setBody("{\n \"ffmpegPath\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/ffmpeg-settings"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ffmpegPath\": \"\"\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 \"ffmpegPath\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/ffmpeg-settings")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/ffmpeg-settings")
.header("content-type", "application/json")
.body("{\n \"ffmpegPath\": \"\"\n}")
.asString();
const data = JSON.stringify({
ffmpegPath: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/ffmpeg-settings');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/ffmpeg-settings',
headers: {'content-type': 'application/json'},
data: {ffmpegPath: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/ffmpeg-settings';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"ffmpegPath":""}'
};
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}}/api/ffmpeg-settings',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "ffmpegPath": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ffmpegPath\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/ffmpeg-settings")
.post(body)
.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/api/ffmpeg-settings',
headers: {
'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({ffmpegPath: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/ffmpeg-settings',
headers: {'content-type': 'application/json'},
body: {ffmpegPath: ''},
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}}/api/ffmpeg-settings');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
ffmpegPath: ''
});
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}}/api/ffmpeg-settings',
headers: {'content-type': 'application/json'},
data: {ffmpegPath: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/ffmpeg-settings';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"ffmpegPath":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ffmpegPath": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/ffmpeg-settings"]
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}}/api/ffmpeg-settings" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"ffmpegPath\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/ffmpeg-settings",
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([
'ffmpegPath' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/ffmpeg-settings', [
'body' => '{
"ffmpegPath": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/ffmpeg-settings');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ffmpegPath' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ffmpegPath' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/ffmpeg-settings');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/ffmpeg-settings' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ffmpegPath": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/ffmpeg-settings' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ffmpegPath": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ffmpegPath\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/ffmpeg-settings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/ffmpeg-settings"
payload = { "ffmpegPath": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/ffmpeg-settings"
payload <- "{\n \"ffmpegPath\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/ffmpeg-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"ffmpegPath\": \"\"\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/api/ffmpeg-settings') do |req|
req.body = "{\n \"ffmpegPath\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/ffmpeg-settings";
let payload = json!({"ffmpegPath": ""});
let mut headers = reqwest::header::HeaderMap::new();
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}}/api/ffmpeg-settings \
--header 'content-type: application/json' \
--data '{
"ffmpegPath": ""
}'
echo '{
"ffmpegPath": ""
}' | \
http POST {{baseUrl}}/api/ffmpeg-settings \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "ffmpegPath": ""\n}' \
--output-document \
- {{baseUrl}}/api/ffmpeg-settings
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["ffmpegPath": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/ffmpeg-settings")! 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
post -api-hdhr-settings
{{baseUrl}}/api/hdhr-settings
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/hdhr-settings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/hdhr-settings")
require "http/client"
url = "{{baseUrl}}/api/hdhr-settings"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/api/hdhr-settings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/hdhr-settings");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/hdhr-settings"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/api/hdhr-settings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/hdhr-settings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/hdhr-settings"))
.method("POST", 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}}/api/hdhr-settings")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/hdhr-settings")
.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('POST', '{{baseUrl}}/api/hdhr-settings');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/api/hdhr-settings'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/hdhr-settings';
const options = {method: 'POST'};
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}}/api/hdhr-settings',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/hdhr-settings")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/hdhr-settings',
headers: {}
};
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: 'POST', url: '{{baseUrl}}/api/hdhr-settings'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/api/hdhr-settings');
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}}/api/hdhr-settings'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/hdhr-settings';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/hdhr-settings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/hdhr-settings" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/hdhr-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/hdhr-settings');
echo $response->getBody();
setUrl('{{baseUrl}}/api/hdhr-settings');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/hdhr-settings');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/hdhr-settings' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/hdhr-settings' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/api/hdhr-settings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/hdhr-settings"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/hdhr-settings"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/hdhr-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/api/hdhr-settings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/hdhr-settings";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/api/hdhr-settings
http POST {{baseUrl}}/api/hdhr-settings
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/api/hdhr-settings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/hdhr-settings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
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
post -api-plex-settings
{{baseUrl}}/api/plex-settings
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/plex-settings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/plex-settings")
require "http/client"
url = "{{baseUrl}}/api/plex-settings"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/api/plex-settings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/plex-settings");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/plex-settings"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/api/plex-settings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/plex-settings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/plex-settings"))
.method("POST", 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}}/api/plex-settings")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/plex-settings")
.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('POST', '{{baseUrl}}/api/plex-settings');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/api/plex-settings'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/plex-settings';
const options = {method: 'POST'};
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}}/api/plex-settings',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/plex-settings")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/plex-settings',
headers: {}
};
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: 'POST', url: '{{baseUrl}}/api/plex-settings'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/api/plex-settings');
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}}/api/plex-settings'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/plex-settings';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/plex-settings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/plex-settings" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/plex-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/plex-settings');
echo $response->getBody();
setUrl('{{baseUrl}}/api/plex-settings');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/plex-settings');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/plex-settings' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/plex-settings' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/api/plex-settings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/plex-settings"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/plex-settings"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/plex-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/api/plex-settings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/plex-settings";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/api/plex-settings
http POST {{baseUrl}}/api/plex-settings
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/api/plex-settings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/plex-settings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
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
post -api-transcode_configs
{{baseUrl}}/api/transcode_configs
BODY json
{
"name": "",
"threadCount": "",
"hardwareAccelerationMode": "",
"vaapiDriver": "",
"vaapiDevice": "",
"resolution": {
"widthPx": "",
"heightPx": ""
},
"videoFormat": "",
"videoProfile": "",
"videoPreset": "",
"videoBitDepth": "",
"videoBitRate": "",
"videoBufferSize": "",
"audioChannels": "",
"audioFormat": "",
"audioBitRate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioVolumePercent": "",
"normalizeFrameRate": false,
"deinterlaceVideo": false,
"disableChannelOverlay": false,
"errorScreen": "",
"errorScreenAudio": "",
"isDefault": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/transcode_configs");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/transcode_configs" {:content-type :json
:form-params {:name ""
:threadCount ""
:hardwareAccelerationMode ""
:vaapiDriver ""
:vaapiDevice ""
:resolution {:widthPx ""
:heightPx ""}
:videoFormat ""
:videoProfile ""
:videoPreset ""
:videoBitDepth ""
:videoBitRate ""
:videoBufferSize ""
:audioChannels ""
:audioFormat ""
:audioBitRate ""
:audioBufferSize ""
:audioSampleRate ""
:audioVolumePercent ""
:normalizeFrameRate false
:deinterlaceVideo false
:disableChannelOverlay false
:errorScreen ""
:errorScreenAudio ""
:isDefault false}})
require "http/client"
url = "{{baseUrl}}/api/transcode_configs"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\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}}/api/transcode_configs"),
Content = new StringContent("{\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\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}}/api/transcode_configs");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/transcode_configs"
payload := strings.NewReader("{\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
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/api/transcode_configs HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 615
{
"name": "",
"threadCount": "",
"hardwareAccelerationMode": "",
"vaapiDriver": "",
"vaapiDevice": "",
"resolution": {
"widthPx": "",
"heightPx": ""
},
"videoFormat": "",
"videoProfile": "",
"videoPreset": "",
"videoBitDepth": "",
"videoBitRate": "",
"videoBufferSize": "",
"audioChannels": "",
"audioFormat": "",
"audioBitRate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioVolumePercent": "",
"normalizeFrameRate": false,
"deinterlaceVideo": false,
"disableChannelOverlay": false,
"errorScreen": "",
"errorScreenAudio": "",
"isDefault": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/transcode_configs")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/transcode_configs"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\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 \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/transcode_configs")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/transcode_configs")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}")
.asString();
const data = JSON.stringify({
name: '',
threadCount: '',
hardwareAccelerationMode: '',
vaapiDriver: '',
vaapiDevice: '',
resolution: {
widthPx: '',
heightPx: ''
},
videoFormat: '',
videoProfile: '',
videoPreset: '',
videoBitDepth: '',
videoBitRate: '',
videoBufferSize: '',
audioChannels: '',
audioFormat: '',
audioBitRate: '',
audioBufferSize: '',
audioSampleRate: '',
audioVolumePercent: '',
normalizeFrameRate: false,
deinterlaceVideo: false,
disableChannelOverlay: false,
errorScreen: '',
errorScreenAudio: '',
isDefault: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/transcode_configs');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/transcode_configs',
headers: {'content-type': 'application/json'},
data: {
name: '',
threadCount: '',
hardwareAccelerationMode: '',
vaapiDriver: '',
vaapiDevice: '',
resolution: {widthPx: '', heightPx: ''},
videoFormat: '',
videoProfile: '',
videoPreset: '',
videoBitDepth: '',
videoBitRate: '',
videoBufferSize: '',
audioChannels: '',
audioFormat: '',
audioBitRate: '',
audioBufferSize: '',
audioSampleRate: '',
audioVolumePercent: '',
normalizeFrameRate: false,
deinterlaceVideo: false,
disableChannelOverlay: false,
errorScreen: '',
errorScreenAudio: '',
isDefault: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/transcode_configs';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","threadCount":"","hardwareAccelerationMode":"","vaapiDriver":"","vaapiDevice":"","resolution":{"widthPx":"","heightPx":""},"videoFormat":"","videoProfile":"","videoPreset":"","videoBitDepth":"","videoBitRate":"","videoBufferSize":"","audioChannels":"","audioFormat":"","audioBitRate":"","audioBufferSize":"","audioSampleRate":"","audioVolumePercent":"","normalizeFrameRate":false,"deinterlaceVideo":false,"disableChannelOverlay":false,"errorScreen":"","errorScreenAudio":"","isDefault":false}'
};
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}}/api/transcode_configs',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "threadCount": "",\n "hardwareAccelerationMode": "",\n "vaapiDriver": "",\n "vaapiDevice": "",\n "resolution": {\n "widthPx": "",\n "heightPx": ""\n },\n "videoFormat": "",\n "videoProfile": "",\n "videoPreset": "",\n "videoBitDepth": "",\n "videoBitRate": "",\n "videoBufferSize": "",\n "audioChannels": "",\n "audioFormat": "",\n "audioBitRate": "",\n "audioBufferSize": "",\n "audioSampleRate": "",\n "audioVolumePercent": "",\n "normalizeFrameRate": false,\n "deinterlaceVideo": false,\n "disableChannelOverlay": false,\n "errorScreen": "",\n "errorScreenAudio": "",\n "isDefault": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/transcode_configs")
.post(body)
.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/api/transcode_configs',
headers: {
'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({
name: '',
threadCount: '',
hardwareAccelerationMode: '',
vaapiDriver: '',
vaapiDevice: '',
resolution: {widthPx: '', heightPx: ''},
videoFormat: '',
videoProfile: '',
videoPreset: '',
videoBitDepth: '',
videoBitRate: '',
videoBufferSize: '',
audioChannels: '',
audioFormat: '',
audioBitRate: '',
audioBufferSize: '',
audioSampleRate: '',
audioVolumePercent: '',
normalizeFrameRate: false,
deinterlaceVideo: false,
disableChannelOverlay: false,
errorScreen: '',
errorScreenAudio: '',
isDefault: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/transcode_configs',
headers: {'content-type': 'application/json'},
body: {
name: '',
threadCount: '',
hardwareAccelerationMode: '',
vaapiDriver: '',
vaapiDevice: '',
resolution: {widthPx: '', heightPx: ''},
videoFormat: '',
videoProfile: '',
videoPreset: '',
videoBitDepth: '',
videoBitRate: '',
videoBufferSize: '',
audioChannels: '',
audioFormat: '',
audioBitRate: '',
audioBufferSize: '',
audioSampleRate: '',
audioVolumePercent: '',
normalizeFrameRate: false,
deinterlaceVideo: false,
disableChannelOverlay: false,
errorScreen: '',
errorScreenAudio: '',
isDefault: false
},
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}}/api/transcode_configs');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
threadCount: '',
hardwareAccelerationMode: '',
vaapiDriver: '',
vaapiDevice: '',
resolution: {
widthPx: '',
heightPx: ''
},
videoFormat: '',
videoProfile: '',
videoPreset: '',
videoBitDepth: '',
videoBitRate: '',
videoBufferSize: '',
audioChannels: '',
audioFormat: '',
audioBitRate: '',
audioBufferSize: '',
audioSampleRate: '',
audioVolumePercent: '',
normalizeFrameRate: false,
deinterlaceVideo: false,
disableChannelOverlay: false,
errorScreen: '',
errorScreenAudio: '',
isDefault: false
});
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}}/api/transcode_configs',
headers: {'content-type': 'application/json'},
data: {
name: '',
threadCount: '',
hardwareAccelerationMode: '',
vaapiDriver: '',
vaapiDevice: '',
resolution: {widthPx: '', heightPx: ''},
videoFormat: '',
videoProfile: '',
videoPreset: '',
videoBitDepth: '',
videoBitRate: '',
videoBufferSize: '',
audioChannels: '',
audioFormat: '',
audioBitRate: '',
audioBufferSize: '',
audioSampleRate: '',
audioVolumePercent: '',
normalizeFrameRate: false,
deinterlaceVideo: false,
disableChannelOverlay: false,
errorScreen: '',
errorScreenAudio: '',
isDefault: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/transcode_configs';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","threadCount":"","hardwareAccelerationMode":"","vaapiDriver":"","vaapiDevice":"","resolution":{"widthPx":"","heightPx":""},"videoFormat":"","videoProfile":"","videoPreset":"","videoBitDepth":"","videoBitRate":"","videoBufferSize":"","audioChannels":"","audioFormat":"","audioBitRate":"","audioBufferSize":"","audioSampleRate":"","audioVolumePercent":"","normalizeFrameRate":false,"deinterlaceVideo":false,"disableChannelOverlay":false,"errorScreen":"","errorScreenAudio":"","isDefault":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"name": @"",
@"threadCount": @"",
@"hardwareAccelerationMode": @"",
@"vaapiDriver": @"",
@"vaapiDevice": @"",
@"resolution": @{ @"widthPx": @"", @"heightPx": @"" },
@"videoFormat": @"",
@"videoProfile": @"",
@"videoPreset": @"",
@"videoBitDepth": @"",
@"videoBitRate": @"",
@"videoBufferSize": @"",
@"audioChannels": @"",
@"audioFormat": @"",
@"audioBitRate": @"",
@"audioBufferSize": @"",
@"audioSampleRate": @"",
@"audioVolumePercent": @"",
@"normalizeFrameRate": @NO,
@"deinterlaceVideo": @NO,
@"disableChannelOverlay": @NO,
@"errorScreen": @"",
@"errorScreenAudio": @"",
@"isDefault": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/transcode_configs"]
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}}/api/transcode_configs" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/transcode_configs",
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([
'name' => '',
'threadCount' => '',
'hardwareAccelerationMode' => '',
'vaapiDriver' => '',
'vaapiDevice' => '',
'resolution' => [
'widthPx' => '',
'heightPx' => ''
],
'videoFormat' => '',
'videoProfile' => '',
'videoPreset' => '',
'videoBitDepth' => '',
'videoBitRate' => '',
'videoBufferSize' => '',
'audioChannels' => '',
'audioFormat' => '',
'audioBitRate' => '',
'audioBufferSize' => '',
'audioSampleRate' => '',
'audioVolumePercent' => '',
'normalizeFrameRate' => null,
'deinterlaceVideo' => null,
'disableChannelOverlay' => null,
'errorScreen' => '',
'errorScreenAudio' => '',
'isDefault' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/transcode_configs', [
'body' => '{
"name": "",
"threadCount": "",
"hardwareAccelerationMode": "",
"vaapiDriver": "",
"vaapiDevice": "",
"resolution": {
"widthPx": "",
"heightPx": ""
},
"videoFormat": "",
"videoProfile": "",
"videoPreset": "",
"videoBitDepth": "",
"videoBitRate": "",
"videoBufferSize": "",
"audioChannels": "",
"audioFormat": "",
"audioBitRate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioVolumePercent": "",
"normalizeFrameRate": false,
"deinterlaceVideo": false,
"disableChannelOverlay": false,
"errorScreen": "",
"errorScreenAudio": "",
"isDefault": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/transcode_configs');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'threadCount' => '',
'hardwareAccelerationMode' => '',
'vaapiDriver' => '',
'vaapiDevice' => '',
'resolution' => [
'widthPx' => '',
'heightPx' => ''
],
'videoFormat' => '',
'videoProfile' => '',
'videoPreset' => '',
'videoBitDepth' => '',
'videoBitRate' => '',
'videoBufferSize' => '',
'audioChannels' => '',
'audioFormat' => '',
'audioBitRate' => '',
'audioBufferSize' => '',
'audioSampleRate' => '',
'audioVolumePercent' => '',
'normalizeFrameRate' => null,
'deinterlaceVideo' => null,
'disableChannelOverlay' => null,
'errorScreen' => '',
'errorScreenAudio' => '',
'isDefault' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'threadCount' => '',
'hardwareAccelerationMode' => '',
'vaapiDriver' => '',
'vaapiDevice' => '',
'resolution' => [
'widthPx' => '',
'heightPx' => ''
],
'videoFormat' => '',
'videoProfile' => '',
'videoPreset' => '',
'videoBitDepth' => '',
'videoBitRate' => '',
'videoBufferSize' => '',
'audioChannels' => '',
'audioFormat' => '',
'audioBitRate' => '',
'audioBufferSize' => '',
'audioSampleRate' => '',
'audioVolumePercent' => '',
'normalizeFrameRate' => null,
'deinterlaceVideo' => null,
'disableChannelOverlay' => null,
'errorScreen' => '',
'errorScreenAudio' => '',
'isDefault' => null
]));
$request->setRequestUrl('{{baseUrl}}/api/transcode_configs');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/transcode_configs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"threadCount": "",
"hardwareAccelerationMode": "",
"vaapiDriver": "",
"vaapiDevice": "",
"resolution": {
"widthPx": "",
"heightPx": ""
},
"videoFormat": "",
"videoProfile": "",
"videoPreset": "",
"videoBitDepth": "",
"videoBitRate": "",
"videoBufferSize": "",
"audioChannels": "",
"audioFormat": "",
"audioBitRate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioVolumePercent": "",
"normalizeFrameRate": false,
"deinterlaceVideo": false,
"disableChannelOverlay": false,
"errorScreen": "",
"errorScreenAudio": "",
"isDefault": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/transcode_configs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"threadCount": "",
"hardwareAccelerationMode": "",
"vaapiDriver": "",
"vaapiDevice": "",
"resolution": {
"widthPx": "",
"heightPx": ""
},
"videoFormat": "",
"videoProfile": "",
"videoPreset": "",
"videoBitDepth": "",
"videoBitRate": "",
"videoBufferSize": "",
"audioChannels": "",
"audioFormat": "",
"audioBitRate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioVolumePercent": "",
"normalizeFrameRate": false,
"deinterlaceVideo": false,
"disableChannelOverlay": false,
"errorScreen": "",
"errorScreenAudio": "",
"isDefault": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/transcode_configs", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/transcode_configs"
payload = {
"name": "",
"threadCount": "",
"hardwareAccelerationMode": "",
"vaapiDriver": "",
"vaapiDevice": "",
"resolution": {
"widthPx": "",
"heightPx": ""
},
"videoFormat": "",
"videoProfile": "",
"videoPreset": "",
"videoBitDepth": "",
"videoBitRate": "",
"videoBufferSize": "",
"audioChannels": "",
"audioFormat": "",
"audioBitRate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioVolumePercent": "",
"normalizeFrameRate": False,
"deinterlaceVideo": False,
"disableChannelOverlay": False,
"errorScreen": "",
"errorScreenAudio": "",
"isDefault": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/transcode_configs"
payload <- "{\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/transcode_configs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\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/api/transcode_configs') do |req|
req.body = "{\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/transcode_configs";
let payload = json!({
"name": "",
"threadCount": "",
"hardwareAccelerationMode": "",
"vaapiDriver": "",
"vaapiDevice": "",
"resolution": json!({
"widthPx": "",
"heightPx": ""
}),
"videoFormat": "",
"videoProfile": "",
"videoPreset": "",
"videoBitDepth": "",
"videoBitRate": "",
"videoBufferSize": "",
"audioChannels": "",
"audioFormat": "",
"audioBitRate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioVolumePercent": "",
"normalizeFrameRate": false,
"deinterlaceVideo": false,
"disableChannelOverlay": false,
"errorScreen": "",
"errorScreenAudio": "",
"isDefault": false
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/api/transcode_configs \
--header 'content-type: application/json' \
--data '{
"name": "",
"threadCount": "",
"hardwareAccelerationMode": "",
"vaapiDriver": "",
"vaapiDevice": "",
"resolution": {
"widthPx": "",
"heightPx": ""
},
"videoFormat": "",
"videoProfile": "",
"videoPreset": "",
"videoBitDepth": "",
"videoBitRate": "",
"videoBufferSize": "",
"audioChannels": "",
"audioFormat": "",
"audioBitRate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioVolumePercent": "",
"normalizeFrameRate": false,
"deinterlaceVideo": false,
"disableChannelOverlay": false,
"errorScreen": "",
"errorScreenAudio": "",
"isDefault": false
}'
echo '{
"name": "",
"threadCount": "",
"hardwareAccelerationMode": "",
"vaapiDriver": "",
"vaapiDevice": "",
"resolution": {
"widthPx": "",
"heightPx": ""
},
"videoFormat": "",
"videoProfile": "",
"videoPreset": "",
"videoBitDepth": "",
"videoBitRate": "",
"videoBufferSize": "",
"audioChannels": "",
"audioFormat": "",
"audioBitRate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioVolumePercent": "",
"normalizeFrameRate": false,
"deinterlaceVideo": false,
"disableChannelOverlay": false,
"errorScreen": "",
"errorScreenAudio": "",
"isDefault": false
}' | \
http POST {{baseUrl}}/api/transcode_configs \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "threadCount": "",\n "hardwareAccelerationMode": "",\n "vaapiDriver": "",\n "vaapiDevice": "",\n "resolution": {\n "widthPx": "",\n "heightPx": ""\n },\n "videoFormat": "",\n "videoProfile": "",\n "videoPreset": "",\n "videoBitDepth": "",\n "videoBitRate": "",\n "videoBufferSize": "",\n "audioChannels": "",\n "audioFormat": "",\n "audioBitRate": "",\n "audioBufferSize": "",\n "audioSampleRate": "",\n "audioVolumePercent": "",\n "normalizeFrameRate": false,\n "deinterlaceVideo": false,\n "disableChannelOverlay": false,\n "errorScreen": "",\n "errorScreenAudio": "",\n "isDefault": false\n}' \
--output-document \
- {{baseUrl}}/api/transcode_configs
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"threadCount": "",
"hardwareAccelerationMode": "",
"vaapiDriver": "",
"vaapiDevice": "",
"resolution": [
"widthPx": "",
"heightPx": ""
],
"videoFormat": "",
"videoProfile": "",
"videoPreset": "",
"videoBitDepth": "",
"videoBitRate": "",
"videoBufferSize": "",
"audioChannels": "",
"audioFormat": "",
"audioBitRate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioVolumePercent": "",
"normalizeFrameRate": false,
"deinterlaceVideo": false,
"disableChannelOverlay": false,
"errorScreen": "",
"errorScreenAudio": "",
"isDefault": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/transcode_configs")! 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
post -api-xmltv-settings
{{baseUrl}}/api/xmltv-settings
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/xmltv-settings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/xmltv-settings")
require "http/client"
url = "{{baseUrl}}/api/xmltv-settings"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/api/xmltv-settings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/xmltv-settings");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/xmltv-settings"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/api/xmltv-settings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/xmltv-settings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/xmltv-settings"))
.method("POST", 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}}/api/xmltv-settings")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/xmltv-settings")
.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('POST', '{{baseUrl}}/api/xmltv-settings');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/api/xmltv-settings'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/xmltv-settings';
const options = {method: 'POST'};
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}}/api/xmltv-settings',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/xmltv-settings")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/xmltv-settings',
headers: {}
};
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: 'POST', url: '{{baseUrl}}/api/xmltv-settings'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/api/xmltv-settings');
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}}/api/xmltv-settings'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/xmltv-settings';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/xmltv-settings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/xmltv-settings" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/xmltv-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/xmltv-settings');
echo $response->getBody();
setUrl('{{baseUrl}}/api/xmltv-settings');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/xmltv-settings');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/xmltv-settings' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/xmltv-settings' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/api/xmltv-settings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/xmltv-settings"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/xmltv-settings"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/xmltv-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/api/xmltv-settings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/xmltv-settings";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/api/xmltv-settings
http POST {{baseUrl}}/api/xmltv-settings
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/api/xmltv-settings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/xmltv-settings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
PUT
put -api-ffmpeg-settings
{{baseUrl}}/api/ffmpeg-settings
BODY json
{
"configVersion": "",
"ffmpegExecutablePath": "",
"ffprobeExecutablePath": "",
"numThreads": "",
"concatMuxDelay": "",
"enableLogging": false,
"enableFileLogging": false,
"logLevel": "",
"languagePreferences": {
"preferences": [
{
"iso6391": "",
"iso6392": "",
"displayName": ""
}
]
},
"enableTranscoding": false,
"audioVolumePercent": "",
"videoEncoder": "",
"hardwareAccelerationMode": "",
"videoFormat": "",
"audioEncoder": "",
"targetResolution": {
"widthPx": "",
"heightPx": ""
},
"videoBitrate": "",
"videoBufferSize": "",
"audioBitrate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioChannels": "",
"errorScreen": "",
"errorAudio": "",
"normalizeVideoCodec": false,
"normalizeAudioCodec": false,
"normalizeResolution": false,
"normalizeAudio": false,
"maxFPS": "",
"scalingAlgorithm": "",
"deinterlaceFilter": "",
"disableChannelOverlay": false,
"disableChannelPrelude": false,
"vaapiDevice": "",
"vaapiDriver": "",
"useNewFfmpegPipeline": false,
"hlsDirectOutputFormat": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/ffmpeg-settings");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"configVersion\": \"\",\n \"ffmpegExecutablePath\": \"\",\n \"ffprobeExecutablePath\": \"\",\n \"numThreads\": \"\",\n \"concatMuxDelay\": \"\",\n \"enableLogging\": false,\n \"enableFileLogging\": false,\n \"logLevel\": \"\",\n \"languagePreferences\": {\n \"preferences\": [\n {\n \"iso6391\": \"\",\n \"iso6392\": \"\",\n \"displayName\": \"\"\n }\n ]\n },\n \"enableTranscoding\": false,\n \"audioVolumePercent\": \"\",\n \"videoEncoder\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"videoFormat\": \"\",\n \"audioEncoder\": \"\",\n \"targetResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioBitrate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioChannels\": \"\",\n \"errorScreen\": \"\",\n \"errorAudio\": \"\",\n \"normalizeVideoCodec\": false,\n \"normalizeAudioCodec\": false,\n \"normalizeResolution\": false,\n \"normalizeAudio\": false,\n \"maxFPS\": \"\",\n \"scalingAlgorithm\": \"\",\n \"deinterlaceFilter\": \"\",\n \"disableChannelOverlay\": false,\n \"disableChannelPrelude\": false,\n \"vaapiDevice\": \"\",\n \"vaapiDriver\": \"\",\n \"useNewFfmpegPipeline\": false,\n \"hlsDirectOutputFormat\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/api/ffmpeg-settings" {:content-type :json
:form-params {:configVersion ""
:ffmpegExecutablePath ""
:ffprobeExecutablePath ""
:numThreads ""
:concatMuxDelay ""
:enableLogging false
:enableFileLogging false
:logLevel ""
:languagePreferences {:preferences [{:iso6391 ""
:iso6392 ""
:displayName ""}]}
:enableTranscoding false
:audioVolumePercent ""
:videoEncoder ""
:hardwareAccelerationMode ""
:videoFormat ""
:audioEncoder ""
:targetResolution {:widthPx ""
:heightPx ""}
:videoBitrate ""
:videoBufferSize ""
:audioBitrate ""
:audioBufferSize ""
:audioSampleRate ""
:audioChannels ""
:errorScreen ""
:errorAudio ""
:normalizeVideoCodec false
:normalizeAudioCodec false
:normalizeResolution false
:normalizeAudio false
:maxFPS ""
:scalingAlgorithm ""
:deinterlaceFilter ""
:disableChannelOverlay false
:disableChannelPrelude false
:vaapiDevice ""
:vaapiDriver ""
:useNewFfmpegPipeline false
:hlsDirectOutputFormat ""}})
require "http/client"
url = "{{baseUrl}}/api/ffmpeg-settings"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"configVersion\": \"\",\n \"ffmpegExecutablePath\": \"\",\n \"ffprobeExecutablePath\": \"\",\n \"numThreads\": \"\",\n \"concatMuxDelay\": \"\",\n \"enableLogging\": false,\n \"enableFileLogging\": false,\n \"logLevel\": \"\",\n \"languagePreferences\": {\n \"preferences\": [\n {\n \"iso6391\": \"\",\n \"iso6392\": \"\",\n \"displayName\": \"\"\n }\n ]\n },\n \"enableTranscoding\": false,\n \"audioVolumePercent\": \"\",\n \"videoEncoder\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"videoFormat\": \"\",\n \"audioEncoder\": \"\",\n \"targetResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioBitrate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioChannels\": \"\",\n \"errorScreen\": \"\",\n \"errorAudio\": \"\",\n \"normalizeVideoCodec\": false,\n \"normalizeAudioCodec\": false,\n \"normalizeResolution\": false,\n \"normalizeAudio\": false,\n \"maxFPS\": \"\",\n \"scalingAlgorithm\": \"\",\n \"deinterlaceFilter\": \"\",\n \"disableChannelOverlay\": false,\n \"disableChannelPrelude\": false,\n \"vaapiDevice\": \"\",\n \"vaapiDriver\": \"\",\n \"useNewFfmpegPipeline\": false,\n \"hlsDirectOutputFormat\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/api/ffmpeg-settings"),
Content = new StringContent("{\n \"configVersion\": \"\",\n \"ffmpegExecutablePath\": \"\",\n \"ffprobeExecutablePath\": \"\",\n \"numThreads\": \"\",\n \"concatMuxDelay\": \"\",\n \"enableLogging\": false,\n \"enableFileLogging\": false,\n \"logLevel\": \"\",\n \"languagePreferences\": {\n \"preferences\": [\n {\n \"iso6391\": \"\",\n \"iso6392\": \"\",\n \"displayName\": \"\"\n }\n ]\n },\n \"enableTranscoding\": false,\n \"audioVolumePercent\": \"\",\n \"videoEncoder\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"videoFormat\": \"\",\n \"audioEncoder\": \"\",\n \"targetResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioBitrate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioChannels\": \"\",\n \"errorScreen\": \"\",\n \"errorAudio\": \"\",\n \"normalizeVideoCodec\": false,\n \"normalizeAudioCodec\": false,\n \"normalizeResolution\": false,\n \"normalizeAudio\": false,\n \"maxFPS\": \"\",\n \"scalingAlgorithm\": \"\",\n \"deinterlaceFilter\": \"\",\n \"disableChannelOverlay\": false,\n \"disableChannelPrelude\": false,\n \"vaapiDevice\": \"\",\n \"vaapiDriver\": \"\",\n \"useNewFfmpegPipeline\": false,\n \"hlsDirectOutputFormat\": \"\"\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}}/api/ffmpeg-settings");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"configVersion\": \"\",\n \"ffmpegExecutablePath\": \"\",\n \"ffprobeExecutablePath\": \"\",\n \"numThreads\": \"\",\n \"concatMuxDelay\": \"\",\n \"enableLogging\": false,\n \"enableFileLogging\": false,\n \"logLevel\": \"\",\n \"languagePreferences\": {\n \"preferences\": [\n {\n \"iso6391\": \"\",\n \"iso6392\": \"\",\n \"displayName\": \"\"\n }\n ]\n },\n \"enableTranscoding\": false,\n \"audioVolumePercent\": \"\",\n \"videoEncoder\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"videoFormat\": \"\",\n \"audioEncoder\": \"\",\n \"targetResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioBitrate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioChannels\": \"\",\n \"errorScreen\": \"\",\n \"errorAudio\": \"\",\n \"normalizeVideoCodec\": false,\n \"normalizeAudioCodec\": false,\n \"normalizeResolution\": false,\n \"normalizeAudio\": false,\n \"maxFPS\": \"\",\n \"scalingAlgorithm\": \"\",\n \"deinterlaceFilter\": \"\",\n \"disableChannelOverlay\": false,\n \"disableChannelPrelude\": false,\n \"vaapiDevice\": \"\",\n \"vaapiDriver\": \"\",\n \"useNewFfmpegPipeline\": false,\n \"hlsDirectOutputFormat\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/ffmpeg-settings"
payload := strings.NewReader("{\n \"configVersion\": \"\",\n \"ffmpegExecutablePath\": \"\",\n \"ffprobeExecutablePath\": \"\",\n \"numThreads\": \"\",\n \"concatMuxDelay\": \"\",\n \"enableLogging\": false,\n \"enableFileLogging\": false,\n \"logLevel\": \"\",\n \"languagePreferences\": {\n \"preferences\": [\n {\n \"iso6391\": \"\",\n \"iso6392\": \"\",\n \"displayName\": \"\"\n }\n ]\n },\n \"enableTranscoding\": false,\n \"audioVolumePercent\": \"\",\n \"videoEncoder\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"videoFormat\": \"\",\n \"audioEncoder\": \"\",\n \"targetResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioBitrate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioChannels\": \"\",\n \"errorScreen\": \"\",\n \"errorAudio\": \"\",\n \"normalizeVideoCodec\": false,\n \"normalizeAudioCodec\": false,\n \"normalizeResolution\": false,\n \"normalizeAudio\": false,\n \"maxFPS\": \"\",\n \"scalingAlgorithm\": \"\",\n \"deinterlaceFilter\": \"\",\n \"disableChannelOverlay\": false,\n \"disableChannelPrelude\": false,\n \"vaapiDevice\": \"\",\n \"vaapiDriver\": \"\",\n \"useNewFfmpegPipeline\": false,\n \"hlsDirectOutputFormat\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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))
}
PUT /baseUrl/api/ffmpeg-settings HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1124
{
"configVersion": "",
"ffmpegExecutablePath": "",
"ffprobeExecutablePath": "",
"numThreads": "",
"concatMuxDelay": "",
"enableLogging": false,
"enableFileLogging": false,
"logLevel": "",
"languagePreferences": {
"preferences": [
{
"iso6391": "",
"iso6392": "",
"displayName": ""
}
]
},
"enableTranscoding": false,
"audioVolumePercent": "",
"videoEncoder": "",
"hardwareAccelerationMode": "",
"videoFormat": "",
"audioEncoder": "",
"targetResolution": {
"widthPx": "",
"heightPx": ""
},
"videoBitrate": "",
"videoBufferSize": "",
"audioBitrate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioChannels": "",
"errorScreen": "",
"errorAudio": "",
"normalizeVideoCodec": false,
"normalizeAudioCodec": false,
"normalizeResolution": false,
"normalizeAudio": false,
"maxFPS": "",
"scalingAlgorithm": "",
"deinterlaceFilter": "",
"disableChannelOverlay": false,
"disableChannelPrelude": false,
"vaapiDevice": "",
"vaapiDriver": "",
"useNewFfmpegPipeline": false,
"hlsDirectOutputFormat": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/api/ffmpeg-settings")
.setHeader("content-type", "application/json")
.setBody("{\n \"configVersion\": \"\",\n \"ffmpegExecutablePath\": \"\",\n \"ffprobeExecutablePath\": \"\",\n \"numThreads\": \"\",\n \"concatMuxDelay\": \"\",\n \"enableLogging\": false,\n \"enableFileLogging\": false,\n \"logLevel\": \"\",\n \"languagePreferences\": {\n \"preferences\": [\n {\n \"iso6391\": \"\",\n \"iso6392\": \"\",\n \"displayName\": \"\"\n }\n ]\n },\n \"enableTranscoding\": false,\n \"audioVolumePercent\": \"\",\n \"videoEncoder\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"videoFormat\": \"\",\n \"audioEncoder\": \"\",\n \"targetResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioBitrate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioChannels\": \"\",\n \"errorScreen\": \"\",\n \"errorAudio\": \"\",\n \"normalizeVideoCodec\": false,\n \"normalizeAudioCodec\": false,\n \"normalizeResolution\": false,\n \"normalizeAudio\": false,\n \"maxFPS\": \"\",\n \"scalingAlgorithm\": \"\",\n \"deinterlaceFilter\": \"\",\n \"disableChannelOverlay\": false,\n \"disableChannelPrelude\": false,\n \"vaapiDevice\": \"\",\n \"vaapiDriver\": \"\",\n \"useNewFfmpegPipeline\": false,\n \"hlsDirectOutputFormat\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/ffmpeg-settings"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"configVersion\": \"\",\n \"ffmpegExecutablePath\": \"\",\n \"ffprobeExecutablePath\": \"\",\n \"numThreads\": \"\",\n \"concatMuxDelay\": \"\",\n \"enableLogging\": false,\n \"enableFileLogging\": false,\n \"logLevel\": \"\",\n \"languagePreferences\": {\n \"preferences\": [\n {\n \"iso6391\": \"\",\n \"iso6392\": \"\",\n \"displayName\": \"\"\n }\n ]\n },\n \"enableTranscoding\": false,\n \"audioVolumePercent\": \"\",\n \"videoEncoder\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"videoFormat\": \"\",\n \"audioEncoder\": \"\",\n \"targetResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioBitrate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioChannels\": \"\",\n \"errorScreen\": \"\",\n \"errorAudio\": \"\",\n \"normalizeVideoCodec\": false,\n \"normalizeAudioCodec\": false,\n \"normalizeResolution\": false,\n \"normalizeAudio\": false,\n \"maxFPS\": \"\",\n \"scalingAlgorithm\": \"\",\n \"deinterlaceFilter\": \"\",\n \"disableChannelOverlay\": false,\n \"disableChannelPrelude\": false,\n \"vaapiDevice\": \"\",\n \"vaapiDriver\": \"\",\n \"useNewFfmpegPipeline\": false,\n \"hlsDirectOutputFormat\": \"\"\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 \"configVersion\": \"\",\n \"ffmpegExecutablePath\": \"\",\n \"ffprobeExecutablePath\": \"\",\n \"numThreads\": \"\",\n \"concatMuxDelay\": \"\",\n \"enableLogging\": false,\n \"enableFileLogging\": false,\n \"logLevel\": \"\",\n \"languagePreferences\": {\n \"preferences\": [\n {\n \"iso6391\": \"\",\n \"iso6392\": \"\",\n \"displayName\": \"\"\n }\n ]\n },\n \"enableTranscoding\": false,\n \"audioVolumePercent\": \"\",\n \"videoEncoder\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"videoFormat\": \"\",\n \"audioEncoder\": \"\",\n \"targetResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioBitrate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioChannels\": \"\",\n \"errorScreen\": \"\",\n \"errorAudio\": \"\",\n \"normalizeVideoCodec\": false,\n \"normalizeAudioCodec\": false,\n \"normalizeResolution\": false,\n \"normalizeAudio\": false,\n \"maxFPS\": \"\",\n \"scalingAlgorithm\": \"\",\n \"deinterlaceFilter\": \"\",\n \"disableChannelOverlay\": false,\n \"disableChannelPrelude\": false,\n \"vaapiDevice\": \"\",\n \"vaapiDriver\": \"\",\n \"useNewFfmpegPipeline\": false,\n \"hlsDirectOutputFormat\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/ffmpeg-settings")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/api/ffmpeg-settings")
.header("content-type", "application/json")
.body("{\n \"configVersion\": \"\",\n \"ffmpegExecutablePath\": \"\",\n \"ffprobeExecutablePath\": \"\",\n \"numThreads\": \"\",\n \"concatMuxDelay\": \"\",\n \"enableLogging\": false,\n \"enableFileLogging\": false,\n \"logLevel\": \"\",\n \"languagePreferences\": {\n \"preferences\": [\n {\n \"iso6391\": \"\",\n \"iso6392\": \"\",\n \"displayName\": \"\"\n }\n ]\n },\n \"enableTranscoding\": false,\n \"audioVolumePercent\": \"\",\n \"videoEncoder\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"videoFormat\": \"\",\n \"audioEncoder\": \"\",\n \"targetResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioBitrate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioChannels\": \"\",\n \"errorScreen\": \"\",\n \"errorAudio\": \"\",\n \"normalizeVideoCodec\": false,\n \"normalizeAudioCodec\": false,\n \"normalizeResolution\": false,\n \"normalizeAudio\": false,\n \"maxFPS\": \"\",\n \"scalingAlgorithm\": \"\",\n \"deinterlaceFilter\": \"\",\n \"disableChannelOverlay\": false,\n \"disableChannelPrelude\": false,\n \"vaapiDevice\": \"\",\n \"vaapiDriver\": \"\",\n \"useNewFfmpegPipeline\": false,\n \"hlsDirectOutputFormat\": \"\"\n}")
.asString();
const data = JSON.stringify({
configVersion: '',
ffmpegExecutablePath: '',
ffprobeExecutablePath: '',
numThreads: '',
concatMuxDelay: '',
enableLogging: false,
enableFileLogging: false,
logLevel: '',
languagePreferences: {
preferences: [
{
iso6391: '',
iso6392: '',
displayName: ''
}
]
},
enableTranscoding: false,
audioVolumePercent: '',
videoEncoder: '',
hardwareAccelerationMode: '',
videoFormat: '',
audioEncoder: '',
targetResolution: {
widthPx: '',
heightPx: ''
},
videoBitrate: '',
videoBufferSize: '',
audioBitrate: '',
audioBufferSize: '',
audioSampleRate: '',
audioChannels: '',
errorScreen: '',
errorAudio: '',
normalizeVideoCodec: false,
normalizeAudioCodec: false,
normalizeResolution: false,
normalizeAudio: false,
maxFPS: '',
scalingAlgorithm: '',
deinterlaceFilter: '',
disableChannelOverlay: false,
disableChannelPrelude: false,
vaapiDevice: '',
vaapiDriver: '',
useNewFfmpegPipeline: false,
hlsDirectOutputFormat: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/api/ffmpeg-settings');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/ffmpeg-settings',
headers: {'content-type': 'application/json'},
data: {
configVersion: '',
ffmpegExecutablePath: '',
ffprobeExecutablePath: '',
numThreads: '',
concatMuxDelay: '',
enableLogging: false,
enableFileLogging: false,
logLevel: '',
languagePreferences: {preferences: [{iso6391: '', iso6392: '', displayName: ''}]},
enableTranscoding: false,
audioVolumePercent: '',
videoEncoder: '',
hardwareAccelerationMode: '',
videoFormat: '',
audioEncoder: '',
targetResolution: {widthPx: '', heightPx: ''},
videoBitrate: '',
videoBufferSize: '',
audioBitrate: '',
audioBufferSize: '',
audioSampleRate: '',
audioChannels: '',
errorScreen: '',
errorAudio: '',
normalizeVideoCodec: false,
normalizeAudioCodec: false,
normalizeResolution: false,
normalizeAudio: false,
maxFPS: '',
scalingAlgorithm: '',
deinterlaceFilter: '',
disableChannelOverlay: false,
disableChannelPrelude: false,
vaapiDevice: '',
vaapiDriver: '',
useNewFfmpegPipeline: false,
hlsDirectOutputFormat: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/ffmpeg-settings';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"configVersion":"","ffmpegExecutablePath":"","ffprobeExecutablePath":"","numThreads":"","concatMuxDelay":"","enableLogging":false,"enableFileLogging":false,"logLevel":"","languagePreferences":{"preferences":[{"iso6391":"","iso6392":"","displayName":""}]},"enableTranscoding":false,"audioVolumePercent":"","videoEncoder":"","hardwareAccelerationMode":"","videoFormat":"","audioEncoder":"","targetResolution":{"widthPx":"","heightPx":""},"videoBitrate":"","videoBufferSize":"","audioBitrate":"","audioBufferSize":"","audioSampleRate":"","audioChannels":"","errorScreen":"","errorAudio":"","normalizeVideoCodec":false,"normalizeAudioCodec":false,"normalizeResolution":false,"normalizeAudio":false,"maxFPS":"","scalingAlgorithm":"","deinterlaceFilter":"","disableChannelOverlay":false,"disableChannelPrelude":false,"vaapiDevice":"","vaapiDriver":"","useNewFfmpegPipeline":false,"hlsDirectOutputFormat":""}'
};
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}}/api/ffmpeg-settings',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "configVersion": "",\n "ffmpegExecutablePath": "",\n "ffprobeExecutablePath": "",\n "numThreads": "",\n "concatMuxDelay": "",\n "enableLogging": false,\n "enableFileLogging": false,\n "logLevel": "",\n "languagePreferences": {\n "preferences": [\n {\n "iso6391": "",\n "iso6392": "",\n "displayName": ""\n }\n ]\n },\n "enableTranscoding": false,\n "audioVolumePercent": "",\n "videoEncoder": "",\n "hardwareAccelerationMode": "",\n "videoFormat": "",\n "audioEncoder": "",\n "targetResolution": {\n "widthPx": "",\n "heightPx": ""\n },\n "videoBitrate": "",\n "videoBufferSize": "",\n "audioBitrate": "",\n "audioBufferSize": "",\n "audioSampleRate": "",\n "audioChannels": "",\n "errorScreen": "",\n "errorAudio": "",\n "normalizeVideoCodec": false,\n "normalizeAudioCodec": false,\n "normalizeResolution": false,\n "normalizeAudio": false,\n "maxFPS": "",\n "scalingAlgorithm": "",\n "deinterlaceFilter": "",\n "disableChannelOverlay": false,\n "disableChannelPrelude": false,\n "vaapiDevice": "",\n "vaapiDriver": "",\n "useNewFfmpegPipeline": false,\n "hlsDirectOutputFormat": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"configVersion\": \"\",\n \"ffmpegExecutablePath\": \"\",\n \"ffprobeExecutablePath\": \"\",\n \"numThreads\": \"\",\n \"concatMuxDelay\": \"\",\n \"enableLogging\": false,\n \"enableFileLogging\": false,\n \"logLevel\": \"\",\n \"languagePreferences\": {\n \"preferences\": [\n {\n \"iso6391\": \"\",\n \"iso6392\": \"\",\n \"displayName\": \"\"\n }\n ]\n },\n \"enableTranscoding\": false,\n \"audioVolumePercent\": \"\",\n \"videoEncoder\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"videoFormat\": \"\",\n \"audioEncoder\": \"\",\n \"targetResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioBitrate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioChannels\": \"\",\n \"errorScreen\": \"\",\n \"errorAudio\": \"\",\n \"normalizeVideoCodec\": false,\n \"normalizeAudioCodec\": false,\n \"normalizeResolution\": false,\n \"normalizeAudio\": false,\n \"maxFPS\": \"\",\n \"scalingAlgorithm\": \"\",\n \"deinterlaceFilter\": \"\",\n \"disableChannelOverlay\": false,\n \"disableChannelPrelude\": false,\n \"vaapiDevice\": \"\",\n \"vaapiDriver\": \"\",\n \"useNewFfmpegPipeline\": false,\n \"hlsDirectOutputFormat\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/ffmpeg-settings")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/ffmpeg-settings',
headers: {
'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({
configVersion: '',
ffmpegExecutablePath: '',
ffprobeExecutablePath: '',
numThreads: '',
concatMuxDelay: '',
enableLogging: false,
enableFileLogging: false,
logLevel: '',
languagePreferences: {preferences: [{iso6391: '', iso6392: '', displayName: ''}]},
enableTranscoding: false,
audioVolumePercent: '',
videoEncoder: '',
hardwareAccelerationMode: '',
videoFormat: '',
audioEncoder: '',
targetResolution: {widthPx: '', heightPx: ''},
videoBitrate: '',
videoBufferSize: '',
audioBitrate: '',
audioBufferSize: '',
audioSampleRate: '',
audioChannels: '',
errorScreen: '',
errorAudio: '',
normalizeVideoCodec: false,
normalizeAudioCodec: false,
normalizeResolution: false,
normalizeAudio: false,
maxFPS: '',
scalingAlgorithm: '',
deinterlaceFilter: '',
disableChannelOverlay: false,
disableChannelPrelude: false,
vaapiDevice: '',
vaapiDriver: '',
useNewFfmpegPipeline: false,
hlsDirectOutputFormat: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/ffmpeg-settings',
headers: {'content-type': 'application/json'},
body: {
configVersion: '',
ffmpegExecutablePath: '',
ffprobeExecutablePath: '',
numThreads: '',
concatMuxDelay: '',
enableLogging: false,
enableFileLogging: false,
logLevel: '',
languagePreferences: {preferences: [{iso6391: '', iso6392: '', displayName: ''}]},
enableTranscoding: false,
audioVolumePercent: '',
videoEncoder: '',
hardwareAccelerationMode: '',
videoFormat: '',
audioEncoder: '',
targetResolution: {widthPx: '', heightPx: ''},
videoBitrate: '',
videoBufferSize: '',
audioBitrate: '',
audioBufferSize: '',
audioSampleRate: '',
audioChannels: '',
errorScreen: '',
errorAudio: '',
normalizeVideoCodec: false,
normalizeAudioCodec: false,
normalizeResolution: false,
normalizeAudio: false,
maxFPS: '',
scalingAlgorithm: '',
deinterlaceFilter: '',
disableChannelOverlay: false,
disableChannelPrelude: false,
vaapiDevice: '',
vaapiDriver: '',
useNewFfmpegPipeline: false,
hlsDirectOutputFormat: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/api/ffmpeg-settings');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
configVersion: '',
ffmpegExecutablePath: '',
ffprobeExecutablePath: '',
numThreads: '',
concatMuxDelay: '',
enableLogging: false,
enableFileLogging: false,
logLevel: '',
languagePreferences: {
preferences: [
{
iso6391: '',
iso6392: '',
displayName: ''
}
]
},
enableTranscoding: false,
audioVolumePercent: '',
videoEncoder: '',
hardwareAccelerationMode: '',
videoFormat: '',
audioEncoder: '',
targetResolution: {
widthPx: '',
heightPx: ''
},
videoBitrate: '',
videoBufferSize: '',
audioBitrate: '',
audioBufferSize: '',
audioSampleRate: '',
audioChannels: '',
errorScreen: '',
errorAudio: '',
normalizeVideoCodec: false,
normalizeAudioCodec: false,
normalizeResolution: false,
normalizeAudio: false,
maxFPS: '',
scalingAlgorithm: '',
deinterlaceFilter: '',
disableChannelOverlay: false,
disableChannelPrelude: false,
vaapiDevice: '',
vaapiDriver: '',
useNewFfmpegPipeline: false,
hlsDirectOutputFormat: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/ffmpeg-settings',
headers: {'content-type': 'application/json'},
data: {
configVersion: '',
ffmpegExecutablePath: '',
ffprobeExecutablePath: '',
numThreads: '',
concatMuxDelay: '',
enableLogging: false,
enableFileLogging: false,
logLevel: '',
languagePreferences: {preferences: [{iso6391: '', iso6392: '', displayName: ''}]},
enableTranscoding: false,
audioVolumePercent: '',
videoEncoder: '',
hardwareAccelerationMode: '',
videoFormat: '',
audioEncoder: '',
targetResolution: {widthPx: '', heightPx: ''},
videoBitrate: '',
videoBufferSize: '',
audioBitrate: '',
audioBufferSize: '',
audioSampleRate: '',
audioChannels: '',
errorScreen: '',
errorAudio: '',
normalizeVideoCodec: false,
normalizeAudioCodec: false,
normalizeResolution: false,
normalizeAudio: false,
maxFPS: '',
scalingAlgorithm: '',
deinterlaceFilter: '',
disableChannelOverlay: false,
disableChannelPrelude: false,
vaapiDevice: '',
vaapiDriver: '',
useNewFfmpegPipeline: false,
hlsDirectOutputFormat: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/ffmpeg-settings';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"configVersion":"","ffmpegExecutablePath":"","ffprobeExecutablePath":"","numThreads":"","concatMuxDelay":"","enableLogging":false,"enableFileLogging":false,"logLevel":"","languagePreferences":{"preferences":[{"iso6391":"","iso6392":"","displayName":""}]},"enableTranscoding":false,"audioVolumePercent":"","videoEncoder":"","hardwareAccelerationMode":"","videoFormat":"","audioEncoder":"","targetResolution":{"widthPx":"","heightPx":""},"videoBitrate":"","videoBufferSize":"","audioBitrate":"","audioBufferSize":"","audioSampleRate":"","audioChannels":"","errorScreen":"","errorAudio":"","normalizeVideoCodec":false,"normalizeAudioCodec":false,"normalizeResolution":false,"normalizeAudio":false,"maxFPS":"","scalingAlgorithm":"","deinterlaceFilter":"","disableChannelOverlay":false,"disableChannelPrelude":false,"vaapiDevice":"","vaapiDriver":"","useNewFfmpegPipeline":false,"hlsDirectOutputFormat":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"configVersion": @"",
@"ffmpegExecutablePath": @"",
@"ffprobeExecutablePath": @"",
@"numThreads": @"",
@"concatMuxDelay": @"",
@"enableLogging": @NO,
@"enableFileLogging": @NO,
@"logLevel": @"",
@"languagePreferences": @{ @"preferences": @[ @{ @"iso6391": @"", @"iso6392": @"", @"displayName": @"" } ] },
@"enableTranscoding": @NO,
@"audioVolumePercent": @"",
@"videoEncoder": @"",
@"hardwareAccelerationMode": @"",
@"videoFormat": @"",
@"audioEncoder": @"",
@"targetResolution": @{ @"widthPx": @"", @"heightPx": @"" },
@"videoBitrate": @"",
@"videoBufferSize": @"",
@"audioBitrate": @"",
@"audioBufferSize": @"",
@"audioSampleRate": @"",
@"audioChannels": @"",
@"errorScreen": @"",
@"errorAudio": @"",
@"normalizeVideoCodec": @NO,
@"normalizeAudioCodec": @NO,
@"normalizeResolution": @NO,
@"normalizeAudio": @NO,
@"maxFPS": @"",
@"scalingAlgorithm": @"",
@"deinterlaceFilter": @"",
@"disableChannelOverlay": @NO,
@"disableChannelPrelude": @NO,
@"vaapiDevice": @"",
@"vaapiDriver": @"",
@"useNewFfmpegPipeline": @NO,
@"hlsDirectOutputFormat": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/ffmpeg-settings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[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}}/api/ffmpeg-settings" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"configVersion\": \"\",\n \"ffmpegExecutablePath\": \"\",\n \"ffprobeExecutablePath\": \"\",\n \"numThreads\": \"\",\n \"concatMuxDelay\": \"\",\n \"enableLogging\": false,\n \"enableFileLogging\": false,\n \"logLevel\": \"\",\n \"languagePreferences\": {\n \"preferences\": [\n {\n \"iso6391\": \"\",\n \"iso6392\": \"\",\n \"displayName\": \"\"\n }\n ]\n },\n \"enableTranscoding\": false,\n \"audioVolumePercent\": \"\",\n \"videoEncoder\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"videoFormat\": \"\",\n \"audioEncoder\": \"\",\n \"targetResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioBitrate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioChannels\": \"\",\n \"errorScreen\": \"\",\n \"errorAudio\": \"\",\n \"normalizeVideoCodec\": false,\n \"normalizeAudioCodec\": false,\n \"normalizeResolution\": false,\n \"normalizeAudio\": false,\n \"maxFPS\": \"\",\n \"scalingAlgorithm\": \"\",\n \"deinterlaceFilter\": \"\",\n \"disableChannelOverlay\": false,\n \"disableChannelPrelude\": false,\n \"vaapiDevice\": \"\",\n \"vaapiDriver\": \"\",\n \"useNewFfmpegPipeline\": false,\n \"hlsDirectOutputFormat\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/ffmpeg-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'configVersion' => '',
'ffmpegExecutablePath' => '',
'ffprobeExecutablePath' => '',
'numThreads' => '',
'concatMuxDelay' => '',
'enableLogging' => null,
'enableFileLogging' => null,
'logLevel' => '',
'languagePreferences' => [
'preferences' => [
[
'iso6391' => '',
'iso6392' => '',
'displayName' => ''
]
]
],
'enableTranscoding' => null,
'audioVolumePercent' => '',
'videoEncoder' => '',
'hardwareAccelerationMode' => '',
'videoFormat' => '',
'audioEncoder' => '',
'targetResolution' => [
'widthPx' => '',
'heightPx' => ''
],
'videoBitrate' => '',
'videoBufferSize' => '',
'audioBitrate' => '',
'audioBufferSize' => '',
'audioSampleRate' => '',
'audioChannels' => '',
'errorScreen' => '',
'errorAudio' => '',
'normalizeVideoCodec' => null,
'normalizeAudioCodec' => null,
'normalizeResolution' => null,
'normalizeAudio' => null,
'maxFPS' => '',
'scalingAlgorithm' => '',
'deinterlaceFilter' => '',
'disableChannelOverlay' => null,
'disableChannelPrelude' => null,
'vaapiDevice' => '',
'vaapiDriver' => '',
'useNewFfmpegPipeline' => null,
'hlsDirectOutputFormat' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/api/ffmpeg-settings', [
'body' => '{
"configVersion": "",
"ffmpegExecutablePath": "",
"ffprobeExecutablePath": "",
"numThreads": "",
"concatMuxDelay": "",
"enableLogging": false,
"enableFileLogging": false,
"logLevel": "",
"languagePreferences": {
"preferences": [
{
"iso6391": "",
"iso6392": "",
"displayName": ""
}
]
},
"enableTranscoding": false,
"audioVolumePercent": "",
"videoEncoder": "",
"hardwareAccelerationMode": "",
"videoFormat": "",
"audioEncoder": "",
"targetResolution": {
"widthPx": "",
"heightPx": ""
},
"videoBitrate": "",
"videoBufferSize": "",
"audioBitrate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioChannels": "",
"errorScreen": "",
"errorAudio": "",
"normalizeVideoCodec": false,
"normalizeAudioCodec": false,
"normalizeResolution": false,
"normalizeAudio": false,
"maxFPS": "",
"scalingAlgorithm": "",
"deinterlaceFilter": "",
"disableChannelOverlay": false,
"disableChannelPrelude": false,
"vaapiDevice": "",
"vaapiDriver": "",
"useNewFfmpegPipeline": false,
"hlsDirectOutputFormat": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/ffmpeg-settings');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'configVersion' => '',
'ffmpegExecutablePath' => '',
'ffprobeExecutablePath' => '',
'numThreads' => '',
'concatMuxDelay' => '',
'enableLogging' => null,
'enableFileLogging' => null,
'logLevel' => '',
'languagePreferences' => [
'preferences' => [
[
'iso6391' => '',
'iso6392' => '',
'displayName' => ''
]
]
],
'enableTranscoding' => null,
'audioVolumePercent' => '',
'videoEncoder' => '',
'hardwareAccelerationMode' => '',
'videoFormat' => '',
'audioEncoder' => '',
'targetResolution' => [
'widthPx' => '',
'heightPx' => ''
],
'videoBitrate' => '',
'videoBufferSize' => '',
'audioBitrate' => '',
'audioBufferSize' => '',
'audioSampleRate' => '',
'audioChannels' => '',
'errorScreen' => '',
'errorAudio' => '',
'normalizeVideoCodec' => null,
'normalizeAudioCodec' => null,
'normalizeResolution' => null,
'normalizeAudio' => null,
'maxFPS' => '',
'scalingAlgorithm' => '',
'deinterlaceFilter' => '',
'disableChannelOverlay' => null,
'disableChannelPrelude' => null,
'vaapiDevice' => '',
'vaapiDriver' => '',
'useNewFfmpegPipeline' => null,
'hlsDirectOutputFormat' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'configVersion' => '',
'ffmpegExecutablePath' => '',
'ffprobeExecutablePath' => '',
'numThreads' => '',
'concatMuxDelay' => '',
'enableLogging' => null,
'enableFileLogging' => null,
'logLevel' => '',
'languagePreferences' => [
'preferences' => [
[
'iso6391' => '',
'iso6392' => '',
'displayName' => ''
]
]
],
'enableTranscoding' => null,
'audioVolumePercent' => '',
'videoEncoder' => '',
'hardwareAccelerationMode' => '',
'videoFormat' => '',
'audioEncoder' => '',
'targetResolution' => [
'widthPx' => '',
'heightPx' => ''
],
'videoBitrate' => '',
'videoBufferSize' => '',
'audioBitrate' => '',
'audioBufferSize' => '',
'audioSampleRate' => '',
'audioChannels' => '',
'errorScreen' => '',
'errorAudio' => '',
'normalizeVideoCodec' => null,
'normalizeAudioCodec' => null,
'normalizeResolution' => null,
'normalizeAudio' => null,
'maxFPS' => '',
'scalingAlgorithm' => '',
'deinterlaceFilter' => '',
'disableChannelOverlay' => null,
'disableChannelPrelude' => null,
'vaapiDevice' => '',
'vaapiDriver' => '',
'useNewFfmpegPipeline' => null,
'hlsDirectOutputFormat' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/ffmpeg-settings');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/ffmpeg-settings' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"configVersion": "",
"ffmpegExecutablePath": "",
"ffprobeExecutablePath": "",
"numThreads": "",
"concatMuxDelay": "",
"enableLogging": false,
"enableFileLogging": false,
"logLevel": "",
"languagePreferences": {
"preferences": [
{
"iso6391": "",
"iso6392": "",
"displayName": ""
}
]
},
"enableTranscoding": false,
"audioVolumePercent": "",
"videoEncoder": "",
"hardwareAccelerationMode": "",
"videoFormat": "",
"audioEncoder": "",
"targetResolution": {
"widthPx": "",
"heightPx": ""
},
"videoBitrate": "",
"videoBufferSize": "",
"audioBitrate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioChannels": "",
"errorScreen": "",
"errorAudio": "",
"normalizeVideoCodec": false,
"normalizeAudioCodec": false,
"normalizeResolution": false,
"normalizeAudio": false,
"maxFPS": "",
"scalingAlgorithm": "",
"deinterlaceFilter": "",
"disableChannelOverlay": false,
"disableChannelPrelude": false,
"vaapiDevice": "",
"vaapiDriver": "",
"useNewFfmpegPipeline": false,
"hlsDirectOutputFormat": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/ffmpeg-settings' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"configVersion": "",
"ffmpegExecutablePath": "",
"ffprobeExecutablePath": "",
"numThreads": "",
"concatMuxDelay": "",
"enableLogging": false,
"enableFileLogging": false,
"logLevel": "",
"languagePreferences": {
"preferences": [
{
"iso6391": "",
"iso6392": "",
"displayName": ""
}
]
},
"enableTranscoding": false,
"audioVolumePercent": "",
"videoEncoder": "",
"hardwareAccelerationMode": "",
"videoFormat": "",
"audioEncoder": "",
"targetResolution": {
"widthPx": "",
"heightPx": ""
},
"videoBitrate": "",
"videoBufferSize": "",
"audioBitrate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioChannels": "",
"errorScreen": "",
"errorAudio": "",
"normalizeVideoCodec": false,
"normalizeAudioCodec": false,
"normalizeResolution": false,
"normalizeAudio": false,
"maxFPS": "",
"scalingAlgorithm": "",
"deinterlaceFilter": "",
"disableChannelOverlay": false,
"disableChannelPrelude": false,
"vaapiDevice": "",
"vaapiDriver": "",
"useNewFfmpegPipeline": false,
"hlsDirectOutputFormat": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"configVersion\": \"\",\n \"ffmpegExecutablePath\": \"\",\n \"ffprobeExecutablePath\": \"\",\n \"numThreads\": \"\",\n \"concatMuxDelay\": \"\",\n \"enableLogging\": false,\n \"enableFileLogging\": false,\n \"logLevel\": \"\",\n \"languagePreferences\": {\n \"preferences\": [\n {\n \"iso6391\": \"\",\n \"iso6392\": \"\",\n \"displayName\": \"\"\n }\n ]\n },\n \"enableTranscoding\": false,\n \"audioVolumePercent\": \"\",\n \"videoEncoder\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"videoFormat\": \"\",\n \"audioEncoder\": \"\",\n \"targetResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioBitrate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioChannels\": \"\",\n \"errorScreen\": \"\",\n \"errorAudio\": \"\",\n \"normalizeVideoCodec\": false,\n \"normalizeAudioCodec\": false,\n \"normalizeResolution\": false,\n \"normalizeAudio\": false,\n \"maxFPS\": \"\",\n \"scalingAlgorithm\": \"\",\n \"deinterlaceFilter\": \"\",\n \"disableChannelOverlay\": false,\n \"disableChannelPrelude\": false,\n \"vaapiDevice\": \"\",\n \"vaapiDriver\": \"\",\n \"useNewFfmpegPipeline\": false,\n \"hlsDirectOutputFormat\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/api/ffmpeg-settings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/ffmpeg-settings"
payload = {
"configVersion": "",
"ffmpegExecutablePath": "",
"ffprobeExecutablePath": "",
"numThreads": "",
"concatMuxDelay": "",
"enableLogging": False,
"enableFileLogging": False,
"logLevel": "",
"languagePreferences": { "preferences": [
{
"iso6391": "",
"iso6392": "",
"displayName": ""
}
] },
"enableTranscoding": False,
"audioVolumePercent": "",
"videoEncoder": "",
"hardwareAccelerationMode": "",
"videoFormat": "",
"audioEncoder": "",
"targetResolution": {
"widthPx": "",
"heightPx": ""
},
"videoBitrate": "",
"videoBufferSize": "",
"audioBitrate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioChannels": "",
"errorScreen": "",
"errorAudio": "",
"normalizeVideoCodec": False,
"normalizeAudioCodec": False,
"normalizeResolution": False,
"normalizeAudio": False,
"maxFPS": "",
"scalingAlgorithm": "",
"deinterlaceFilter": "",
"disableChannelOverlay": False,
"disableChannelPrelude": False,
"vaapiDevice": "",
"vaapiDriver": "",
"useNewFfmpegPipeline": False,
"hlsDirectOutputFormat": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/ffmpeg-settings"
payload <- "{\n \"configVersion\": \"\",\n \"ffmpegExecutablePath\": \"\",\n \"ffprobeExecutablePath\": \"\",\n \"numThreads\": \"\",\n \"concatMuxDelay\": \"\",\n \"enableLogging\": false,\n \"enableFileLogging\": false,\n \"logLevel\": \"\",\n \"languagePreferences\": {\n \"preferences\": [\n {\n \"iso6391\": \"\",\n \"iso6392\": \"\",\n \"displayName\": \"\"\n }\n ]\n },\n \"enableTranscoding\": false,\n \"audioVolumePercent\": \"\",\n \"videoEncoder\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"videoFormat\": \"\",\n \"audioEncoder\": \"\",\n \"targetResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioBitrate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioChannels\": \"\",\n \"errorScreen\": \"\",\n \"errorAudio\": \"\",\n \"normalizeVideoCodec\": false,\n \"normalizeAudioCodec\": false,\n \"normalizeResolution\": false,\n \"normalizeAudio\": false,\n \"maxFPS\": \"\",\n \"scalingAlgorithm\": \"\",\n \"deinterlaceFilter\": \"\",\n \"disableChannelOverlay\": false,\n \"disableChannelPrelude\": false,\n \"vaapiDevice\": \"\",\n \"vaapiDriver\": \"\",\n \"useNewFfmpegPipeline\": false,\n \"hlsDirectOutputFormat\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/ffmpeg-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"configVersion\": \"\",\n \"ffmpegExecutablePath\": \"\",\n \"ffprobeExecutablePath\": \"\",\n \"numThreads\": \"\",\n \"concatMuxDelay\": \"\",\n \"enableLogging\": false,\n \"enableFileLogging\": false,\n \"logLevel\": \"\",\n \"languagePreferences\": {\n \"preferences\": [\n {\n \"iso6391\": \"\",\n \"iso6392\": \"\",\n \"displayName\": \"\"\n }\n ]\n },\n \"enableTranscoding\": false,\n \"audioVolumePercent\": \"\",\n \"videoEncoder\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"videoFormat\": \"\",\n \"audioEncoder\": \"\",\n \"targetResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioBitrate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioChannels\": \"\",\n \"errorScreen\": \"\",\n \"errorAudio\": \"\",\n \"normalizeVideoCodec\": false,\n \"normalizeAudioCodec\": false,\n \"normalizeResolution\": false,\n \"normalizeAudio\": false,\n \"maxFPS\": \"\",\n \"scalingAlgorithm\": \"\",\n \"deinterlaceFilter\": \"\",\n \"disableChannelOverlay\": false,\n \"disableChannelPrelude\": false,\n \"vaapiDevice\": \"\",\n \"vaapiDriver\": \"\",\n \"useNewFfmpegPipeline\": false,\n \"hlsDirectOutputFormat\": \"\"\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.put('/baseUrl/api/ffmpeg-settings') do |req|
req.body = "{\n \"configVersion\": \"\",\n \"ffmpegExecutablePath\": \"\",\n \"ffprobeExecutablePath\": \"\",\n \"numThreads\": \"\",\n \"concatMuxDelay\": \"\",\n \"enableLogging\": false,\n \"enableFileLogging\": false,\n \"logLevel\": \"\",\n \"languagePreferences\": {\n \"preferences\": [\n {\n \"iso6391\": \"\",\n \"iso6392\": \"\",\n \"displayName\": \"\"\n }\n ]\n },\n \"enableTranscoding\": false,\n \"audioVolumePercent\": \"\",\n \"videoEncoder\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"videoFormat\": \"\",\n \"audioEncoder\": \"\",\n \"targetResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoBitrate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioBitrate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioChannels\": \"\",\n \"errorScreen\": \"\",\n \"errorAudio\": \"\",\n \"normalizeVideoCodec\": false,\n \"normalizeAudioCodec\": false,\n \"normalizeResolution\": false,\n \"normalizeAudio\": false,\n \"maxFPS\": \"\",\n \"scalingAlgorithm\": \"\",\n \"deinterlaceFilter\": \"\",\n \"disableChannelOverlay\": false,\n \"disableChannelPrelude\": false,\n \"vaapiDevice\": \"\",\n \"vaapiDriver\": \"\",\n \"useNewFfmpegPipeline\": false,\n \"hlsDirectOutputFormat\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/ffmpeg-settings";
let payload = json!({
"configVersion": "",
"ffmpegExecutablePath": "",
"ffprobeExecutablePath": "",
"numThreads": "",
"concatMuxDelay": "",
"enableLogging": false,
"enableFileLogging": false,
"logLevel": "",
"languagePreferences": json!({"preferences": (
json!({
"iso6391": "",
"iso6392": "",
"displayName": ""
})
)}),
"enableTranscoding": false,
"audioVolumePercent": "",
"videoEncoder": "",
"hardwareAccelerationMode": "",
"videoFormat": "",
"audioEncoder": "",
"targetResolution": json!({
"widthPx": "",
"heightPx": ""
}),
"videoBitrate": "",
"videoBufferSize": "",
"audioBitrate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioChannels": "",
"errorScreen": "",
"errorAudio": "",
"normalizeVideoCodec": false,
"normalizeAudioCodec": false,
"normalizeResolution": false,
"normalizeAudio": false,
"maxFPS": "",
"scalingAlgorithm": "",
"deinterlaceFilter": "",
"disableChannelOverlay": false,
"disableChannelPrelude": false,
"vaapiDevice": "",
"vaapiDriver": "",
"useNewFfmpegPipeline": false,
"hlsDirectOutputFormat": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/api/ffmpeg-settings \
--header 'content-type: application/json' \
--data '{
"configVersion": "",
"ffmpegExecutablePath": "",
"ffprobeExecutablePath": "",
"numThreads": "",
"concatMuxDelay": "",
"enableLogging": false,
"enableFileLogging": false,
"logLevel": "",
"languagePreferences": {
"preferences": [
{
"iso6391": "",
"iso6392": "",
"displayName": ""
}
]
},
"enableTranscoding": false,
"audioVolumePercent": "",
"videoEncoder": "",
"hardwareAccelerationMode": "",
"videoFormat": "",
"audioEncoder": "",
"targetResolution": {
"widthPx": "",
"heightPx": ""
},
"videoBitrate": "",
"videoBufferSize": "",
"audioBitrate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioChannels": "",
"errorScreen": "",
"errorAudio": "",
"normalizeVideoCodec": false,
"normalizeAudioCodec": false,
"normalizeResolution": false,
"normalizeAudio": false,
"maxFPS": "",
"scalingAlgorithm": "",
"deinterlaceFilter": "",
"disableChannelOverlay": false,
"disableChannelPrelude": false,
"vaapiDevice": "",
"vaapiDriver": "",
"useNewFfmpegPipeline": false,
"hlsDirectOutputFormat": ""
}'
echo '{
"configVersion": "",
"ffmpegExecutablePath": "",
"ffprobeExecutablePath": "",
"numThreads": "",
"concatMuxDelay": "",
"enableLogging": false,
"enableFileLogging": false,
"logLevel": "",
"languagePreferences": {
"preferences": [
{
"iso6391": "",
"iso6392": "",
"displayName": ""
}
]
},
"enableTranscoding": false,
"audioVolumePercent": "",
"videoEncoder": "",
"hardwareAccelerationMode": "",
"videoFormat": "",
"audioEncoder": "",
"targetResolution": {
"widthPx": "",
"heightPx": ""
},
"videoBitrate": "",
"videoBufferSize": "",
"audioBitrate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioChannels": "",
"errorScreen": "",
"errorAudio": "",
"normalizeVideoCodec": false,
"normalizeAudioCodec": false,
"normalizeResolution": false,
"normalizeAudio": false,
"maxFPS": "",
"scalingAlgorithm": "",
"deinterlaceFilter": "",
"disableChannelOverlay": false,
"disableChannelPrelude": false,
"vaapiDevice": "",
"vaapiDriver": "",
"useNewFfmpegPipeline": false,
"hlsDirectOutputFormat": ""
}' | \
http PUT {{baseUrl}}/api/ffmpeg-settings \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "configVersion": "",\n "ffmpegExecutablePath": "",\n "ffprobeExecutablePath": "",\n "numThreads": "",\n "concatMuxDelay": "",\n "enableLogging": false,\n "enableFileLogging": false,\n "logLevel": "",\n "languagePreferences": {\n "preferences": [\n {\n "iso6391": "",\n "iso6392": "",\n "displayName": ""\n }\n ]\n },\n "enableTranscoding": false,\n "audioVolumePercent": "",\n "videoEncoder": "",\n "hardwareAccelerationMode": "",\n "videoFormat": "",\n "audioEncoder": "",\n "targetResolution": {\n "widthPx": "",\n "heightPx": ""\n },\n "videoBitrate": "",\n "videoBufferSize": "",\n "audioBitrate": "",\n "audioBufferSize": "",\n "audioSampleRate": "",\n "audioChannels": "",\n "errorScreen": "",\n "errorAudio": "",\n "normalizeVideoCodec": false,\n "normalizeAudioCodec": false,\n "normalizeResolution": false,\n "normalizeAudio": false,\n "maxFPS": "",\n "scalingAlgorithm": "",\n "deinterlaceFilter": "",\n "disableChannelOverlay": false,\n "disableChannelPrelude": false,\n "vaapiDevice": "",\n "vaapiDriver": "",\n "useNewFfmpegPipeline": false,\n "hlsDirectOutputFormat": ""\n}' \
--output-document \
- {{baseUrl}}/api/ffmpeg-settings
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"configVersion": "",
"ffmpegExecutablePath": "",
"ffprobeExecutablePath": "",
"numThreads": "",
"concatMuxDelay": "",
"enableLogging": false,
"enableFileLogging": false,
"logLevel": "",
"languagePreferences": ["preferences": [
[
"iso6391": "",
"iso6392": "",
"displayName": ""
]
]],
"enableTranscoding": false,
"audioVolumePercent": "",
"videoEncoder": "",
"hardwareAccelerationMode": "",
"videoFormat": "",
"audioEncoder": "",
"targetResolution": [
"widthPx": "",
"heightPx": ""
],
"videoBitrate": "",
"videoBufferSize": "",
"audioBitrate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioChannels": "",
"errorScreen": "",
"errorAudio": "",
"normalizeVideoCodec": false,
"normalizeAudioCodec": false,
"normalizeResolution": false,
"normalizeAudio": false,
"maxFPS": "",
"scalingAlgorithm": "",
"deinterlaceFilter": "",
"disableChannelOverlay": false,
"disableChannelPrelude": false,
"vaapiDevice": "",
"vaapiDriver": "",
"useNewFfmpegPipeline": false,
"hlsDirectOutputFormat": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/ffmpeg-settings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
PUT
put -api-hdhr-settings
{{baseUrl}}/api/hdhr-settings
BODY json
{
"autoDiscoveryEnabled": false,
"tunerCount": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/hdhr-settings");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"autoDiscoveryEnabled\": false,\n \"tunerCount\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/api/hdhr-settings" {:content-type :json
:form-params {:autoDiscoveryEnabled false
:tunerCount ""}})
require "http/client"
url = "{{baseUrl}}/api/hdhr-settings"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"autoDiscoveryEnabled\": false,\n \"tunerCount\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/api/hdhr-settings"),
Content = new StringContent("{\n \"autoDiscoveryEnabled\": false,\n \"tunerCount\": \"\"\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}}/api/hdhr-settings");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"autoDiscoveryEnabled\": false,\n \"tunerCount\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/hdhr-settings"
payload := strings.NewReader("{\n \"autoDiscoveryEnabled\": false,\n \"tunerCount\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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))
}
PUT /baseUrl/api/hdhr-settings HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 55
{
"autoDiscoveryEnabled": false,
"tunerCount": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/api/hdhr-settings")
.setHeader("content-type", "application/json")
.setBody("{\n \"autoDiscoveryEnabled\": false,\n \"tunerCount\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/hdhr-settings"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"autoDiscoveryEnabled\": false,\n \"tunerCount\": \"\"\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 \"autoDiscoveryEnabled\": false,\n \"tunerCount\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/hdhr-settings")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/api/hdhr-settings")
.header("content-type", "application/json")
.body("{\n \"autoDiscoveryEnabled\": false,\n \"tunerCount\": \"\"\n}")
.asString();
const data = JSON.stringify({
autoDiscoveryEnabled: false,
tunerCount: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/api/hdhr-settings');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/hdhr-settings',
headers: {'content-type': 'application/json'},
data: {autoDiscoveryEnabled: false, tunerCount: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/hdhr-settings';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"autoDiscoveryEnabled":false,"tunerCount":""}'
};
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}}/api/hdhr-settings',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "autoDiscoveryEnabled": false,\n "tunerCount": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"autoDiscoveryEnabled\": false,\n \"tunerCount\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/hdhr-settings")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/hdhr-settings',
headers: {
'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({autoDiscoveryEnabled: false, tunerCount: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/hdhr-settings',
headers: {'content-type': 'application/json'},
body: {autoDiscoveryEnabled: false, tunerCount: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/api/hdhr-settings');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
autoDiscoveryEnabled: false,
tunerCount: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/hdhr-settings',
headers: {'content-type': 'application/json'},
data: {autoDiscoveryEnabled: false, tunerCount: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/hdhr-settings';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"autoDiscoveryEnabled":false,"tunerCount":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"autoDiscoveryEnabled": @NO,
@"tunerCount": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/hdhr-settings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[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}}/api/hdhr-settings" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"autoDiscoveryEnabled\": false,\n \"tunerCount\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/hdhr-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'autoDiscoveryEnabled' => null,
'tunerCount' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/api/hdhr-settings', [
'body' => '{
"autoDiscoveryEnabled": false,
"tunerCount": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/hdhr-settings');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'autoDiscoveryEnabled' => null,
'tunerCount' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'autoDiscoveryEnabled' => null,
'tunerCount' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/hdhr-settings');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/hdhr-settings' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"autoDiscoveryEnabled": false,
"tunerCount": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/hdhr-settings' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"autoDiscoveryEnabled": false,
"tunerCount": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"autoDiscoveryEnabled\": false,\n \"tunerCount\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/api/hdhr-settings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/hdhr-settings"
payload = {
"autoDiscoveryEnabled": False,
"tunerCount": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/hdhr-settings"
payload <- "{\n \"autoDiscoveryEnabled\": false,\n \"tunerCount\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/hdhr-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"autoDiscoveryEnabled\": false,\n \"tunerCount\": \"\"\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.put('/baseUrl/api/hdhr-settings') do |req|
req.body = "{\n \"autoDiscoveryEnabled\": false,\n \"tunerCount\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/hdhr-settings";
let payload = json!({
"autoDiscoveryEnabled": false,
"tunerCount": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/api/hdhr-settings \
--header 'content-type: application/json' \
--data '{
"autoDiscoveryEnabled": false,
"tunerCount": ""
}'
echo '{
"autoDiscoveryEnabled": false,
"tunerCount": ""
}' | \
http PUT {{baseUrl}}/api/hdhr-settings \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "autoDiscoveryEnabled": false,\n "tunerCount": ""\n}' \
--output-document \
- {{baseUrl}}/api/hdhr-settings
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"autoDiscoveryEnabled": false,
"tunerCount": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/hdhr-settings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
PUT
put -api-plex-settings
{{baseUrl}}/api/plex-settings
BODY json
{
"streamPath": "",
"enableDebugLogging": false,
"directStreamBitrate": "",
"transcodeBitrate": "",
"mediaBufferSize": "",
"transcodeMediaBufferSize": "",
"maxPlayableResolution": {
"widthPx": "",
"heightPx": ""
},
"maxTranscodeResolution": {
"widthPx": "",
"heightPx": ""
},
"videoCodecs": [],
"audioCodecs": [],
"maxAudioChannels": "",
"audioBoost": "",
"enableSubtitles": false,
"subtitleSize": "",
"updatePlayStatus": false,
"streamProtocol": "",
"forceDirectPlay": false,
"pathReplace": "",
"pathReplaceWith": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/plex-settings");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"streamPath\": \"\",\n \"enableDebugLogging\": false,\n \"directStreamBitrate\": \"\",\n \"transcodeBitrate\": \"\",\n \"mediaBufferSize\": \"\",\n \"transcodeMediaBufferSize\": \"\",\n \"maxPlayableResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"maxTranscodeResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoCodecs\": [],\n \"audioCodecs\": [],\n \"maxAudioChannels\": \"\",\n \"audioBoost\": \"\",\n \"enableSubtitles\": false,\n \"subtitleSize\": \"\",\n \"updatePlayStatus\": false,\n \"streamProtocol\": \"\",\n \"forceDirectPlay\": false,\n \"pathReplace\": \"\",\n \"pathReplaceWith\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/api/plex-settings" {:content-type :json
:form-params {:streamPath ""
:enableDebugLogging false
:directStreamBitrate ""
:transcodeBitrate ""
:mediaBufferSize ""
:transcodeMediaBufferSize ""
:maxPlayableResolution {:widthPx ""
:heightPx ""}
:maxTranscodeResolution {:widthPx ""
:heightPx ""}
:videoCodecs []
:audioCodecs []
:maxAudioChannels ""
:audioBoost ""
:enableSubtitles false
:subtitleSize ""
:updatePlayStatus false
:streamProtocol ""
:forceDirectPlay false
:pathReplace ""
:pathReplaceWith ""}})
require "http/client"
url = "{{baseUrl}}/api/plex-settings"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"streamPath\": \"\",\n \"enableDebugLogging\": false,\n \"directStreamBitrate\": \"\",\n \"transcodeBitrate\": \"\",\n \"mediaBufferSize\": \"\",\n \"transcodeMediaBufferSize\": \"\",\n \"maxPlayableResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"maxTranscodeResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoCodecs\": [],\n \"audioCodecs\": [],\n \"maxAudioChannels\": \"\",\n \"audioBoost\": \"\",\n \"enableSubtitles\": false,\n \"subtitleSize\": \"\",\n \"updatePlayStatus\": false,\n \"streamProtocol\": \"\",\n \"forceDirectPlay\": false,\n \"pathReplace\": \"\",\n \"pathReplaceWith\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/api/plex-settings"),
Content = new StringContent("{\n \"streamPath\": \"\",\n \"enableDebugLogging\": false,\n \"directStreamBitrate\": \"\",\n \"transcodeBitrate\": \"\",\n \"mediaBufferSize\": \"\",\n \"transcodeMediaBufferSize\": \"\",\n \"maxPlayableResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"maxTranscodeResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoCodecs\": [],\n \"audioCodecs\": [],\n \"maxAudioChannels\": \"\",\n \"audioBoost\": \"\",\n \"enableSubtitles\": false,\n \"subtitleSize\": \"\",\n \"updatePlayStatus\": false,\n \"streamProtocol\": \"\",\n \"forceDirectPlay\": false,\n \"pathReplace\": \"\",\n \"pathReplaceWith\": \"\"\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}}/api/plex-settings");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"streamPath\": \"\",\n \"enableDebugLogging\": false,\n \"directStreamBitrate\": \"\",\n \"transcodeBitrate\": \"\",\n \"mediaBufferSize\": \"\",\n \"transcodeMediaBufferSize\": \"\",\n \"maxPlayableResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"maxTranscodeResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoCodecs\": [],\n \"audioCodecs\": [],\n \"maxAudioChannels\": \"\",\n \"audioBoost\": \"\",\n \"enableSubtitles\": false,\n \"subtitleSize\": \"\",\n \"updatePlayStatus\": false,\n \"streamProtocol\": \"\",\n \"forceDirectPlay\": false,\n \"pathReplace\": \"\",\n \"pathReplaceWith\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/plex-settings"
payload := strings.NewReader("{\n \"streamPath\": \"\",\n \"enableDebugLogging\": false,\n \"directStreamBitrate\": \"\",\n \"transcodeBitrate\": \"\",\n \"mediaBufferSize\": \"\",\n \"transcodeMediaBufferSize\": \"\",\n \"maxPlayableResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"maxTranscodeResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoCodecs\": [],\n \"audioCodecs\": [],\n \"maxAudioChannels\": \"\",\n \"audioBoost\": \"\",\n \"enableSubtitles\": false,\n \"subtitleSize\": \"\",\n \"updatePlayStatus\": false,\n \"streamProtocol\": \"\",\n \"forceDirectPlay\": false,\n \"pathReplace\": \"\",\n \"pathReplaceWith\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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))
}
PUT /baseUrl/api/plex-settings HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 577
{
"streamPath": "",
"enableDebugLogging": false,
"directStreamBitrate": "",
"transcodeBitrate": "",
"mediaBufferSize": "",
"transcodeMediaBufferSize": "",
"maxPlayableResolution": {
"widthPx": "",
"heightPx": ""
},
"maxTranscodeResolution": {
"widthPx": "",
"heightPx": ""
},
"videoCodecs": [],
"audioCodecs": [],
"maxAudioChannels": "",
"audioBoost": "",
"enableSubtitles": false,
"subtitleSize": "",
"updatePlayStatus": false,
"streamProtocol": "",
"forceDirectPlay": false,
"pathReplace": "",
"pathReplaceWith": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/api/plex-settings")
.setHeader("content-type", "application/json")
.setBody("{\n \"streamPath\": \"\",\n \"enableDebugLogging\": false,\n \"directStreamBitrate\": \"\",\n \"transcodeBitrate\": \"\",\n \"mediaBufferSize\": \"\",\n \"transcodeMediaBufferSize\": \"\",\n \"maxPlayableResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"maxTranscodeResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoCodecs\": [],\n \"audioCodecs\": [],\n \"maxAudioChannels\": \"\",\n \"audioBoost\": \"\",\n \"enableSubtitles\": false,\n \"subtitleSize\": \"\",\n \"updatePlayStatus\": false,\n \"streamProtocol\": \"\",\n \"forceDirectPlay\": false,\n \"pathReplace\": \"\",\n \"pathReplaceWith\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/plex-settings"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"streamPath\": \"\",\n \"enableDebugLogging\": false,\n \"directStreamBitrate\": \"\",\n \"transcodeBitrate\": \"\",\n \"mediaBufferSize\": \"\",\n \"transcodeMediaBufferSize\": \"\",\n \"maxPlayableResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"maxTranscodeResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoCodecs\": [],\n \"audioCodecs\": [],\n \"maxAudioChannels\": \"\",\n \"audioBoost\": \"\",\n \"enableSubtitles\": false,\n \"subtitleSize\": \"\",\n \"updatePlayStatus\": false,\n \"streamProtocol\": \"\",\n \"forceDirectPlay\": false,\n \"pathReplace\": \"\",\n \"pathReplaceWith\": \"\"\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 \"streamPath\": \"\",\n \"enableDebugLogging\": false,\n \"directStreamBitrate\": \"\",\n \"transcodeBitrate\": \"\",\n \"mediaBufferSize\": \"\",\n \"transcodeMediaBufferSize\": \"\",\n \"maxPlayableResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"maxTranscodeResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoCodecs\": [],\n \"audioCodecs\": [],\n \"maxAudioChannels\": \"\",\n \"audioBoost\": \"\",\n \"enableSubtitles\": false,\n \"subtitleSize\": \"\",\n \"updatePlayStatus\": false,\n \"streamProtocol\": \"\",\n \"forceDirectPlay\": false,\n \"pathReplace\": \"\",\n \"pathReplaceWith\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/plex-settings")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/api/plex-settings")
.header("content-type", "application/json")
.body("{\n \"streamPath\": \"\",\n \"enableDebugLogging\": false,\n \"directStreamBitrate\": \"\",\n \"transcodeBitrate\": \"\",\n \"mediaBufferSize\": \"\",\n \"transcodeMediaBufferSize\": \"\",\n \"maxPlayableResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"maxTranscodeResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoCodecs\": [],\n \"audioCodecs\": [],\n \"maxAudioChannels\": \"\",\n \"audioBoost\": \"\",\n \"enableSubtitles\": false,\n \"subtitleSize\": \"\",\n \"updatePlayStatus\": false,\n \"streamProtocol\": \"\",\n \"forceDirectPlay\": false,\n \"pathReplace\": \"\",\n \"pathReplaceWith\": \"\"\n}")
.asString();
const data = JSON.stringify({
streamPath: '',
enableDebugLogging: false,
directStreamBitrate: '',
transcodeBitrate: '',
mediaBufferSize: '',
transcodeMediaBufferSize: '',
maxPlayableResolution: {
widthPx: '',
heightPx: ''
},
maxTranscodeResolution: {
widthPx: '',
heightPx: ''
},
videoCodecs: [],
audioCodecs: [],
maxAudioChannels: '',
audioBoost: '',
enableSubtitles: false,
subtitleSize: '',
updatePlayStatus: false,
streamProtocol: '',
forceDirectPlay: false,
pathReplace: '',
pathReplaceWith: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/api/plex-settings');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/plex-settings',
headers: {'content-type': 'application/json'},
data: {
streamPath: '',
enableDebugLogging: false,
directStreamBitrate: '',
transcodeBitrate: '',
mediaBufferSize: '',
transcodeMediaBufferSize: '',
maxPlayableResolution: {widthPx: '', heightPx: ''},
maxTranscodeResolution: {widthPx: '', heightPx: ''},
videoCodecs: [],
audioCodecs: [],
maxAudioChannels: '',
audioBoost: '',
enableSubtitles: false,
subtitleSize: '',
updatePlayStatus: false,
streamProtocol: '',
forceDirectPlay: false,
pathReplace: '',
pathReplaceWith: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/plex-settings';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"streamPath":"","enableDebugLogging":false,"directStreamBitrate":"","transcodeBitrate":"","mediaBufferSize":"","transcodeMediaBufferSize":"","maxPlayableResolution":{"widthPx":"","heightPx":""},"maxTranscodeResolution":{"widthPx":"","heightPx":""},"videoCodecs":[],"audioCodecs":[],"maxAudioChannels":"","audioBoost":"","enableSubtitles":false,"subtitleSize":"","updatePlayStatus":false,"streamProtocol":"","forceDirectPlay":false,"pathReplace":"","pathReplaceWith":""}'
};
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}}/api/plex-settings',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "streamPath": "",\n "enableDebugLogging": false,\n "directStreamBitrate": "",\n "transcodeBitrate": "",\n "mediaBufferSize": "",\n "transcodeMediaBufferSize": "",\n "maxPlayableResolution": {\n "widthPx": "",\n "heightPx": ""\n },\n "maxTranscodeResolution": {\n "widthPx": "",\n "heightPx": ""\n },\n "videoCodecs": [],\n "audioCodecs": [],\n "maxAudioChannels": "",\n "audioBoost": "",\n "enableSubtitles": false,\n "subtitleSize": "",\n "updatePlayStatus": false,\n "streamProtocol": "",\n "forceDirectPlay": false,\n "pathReplace": "",\n "pathReplaceWith": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"streamPath\": \"\",\n \"enableDebugLogging\": false,\n \"directStreamBitrate\": \"\",\n \"transcodeBitrate\": \"\",\n \"mediaBufferSize\": \"\",\n \"transcodeMediaBufferSize\": \"\",\n \"maxPlayableResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"maxTranscodeResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoCodecs\": [],\n \"audioCodecs\": [],\n \"maxAudioChannels\": \"\",\n \"audioBoost\": \"\",\n \"enableSubtitles\": false,\n \"subtitleSize\": \"\",\n \"updatePlayStatus\": false,\n \"streamProtocol\": \"\",\n \"forceDirectPlay\": false,\n \"pathReplace\": \"\",\n \"pathReplaceWith\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/plex-settings")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/plex-settings',
headers: {
'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({
streamPath: '',
enableDebugLogging: false,
directStreamBitrate: '',
transcodeBitrate: '',
mediaBufferSize: '',
transcodeMediaBufferSize: '',
maxPlayableResolution: {widthPx: '', heightPx: ''},
maxTranscodeResolution: {widthPx: '', heightPx: ''},
videoCodecs: [],
audioCodecs: [],
maxAudioChannels: '',
audioBoost: '',
enableSubtitles: false,
subtitleSize: '',
updatePlayStatus: false,
streamProtocol: '',
forceDirectPlay: false,
pathReplace: '',
pathReplaceWith: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/plex-settings',
headers: {'content-type': 'application/json'},
body: {
streamPath: '',
enableDebugLogging: false,
directStreamBitrate: '',
transcodeBitrate: '',
mediaBufferSize: '',
transcodeMediaBufferSize: '',
maxPlayableResolution: {widthPx: '', heightPx: ''},
maxTranscodeResolution: {widthPx: '', heightPx: ''},
videoCodecs: [],
audioCodecs: [],
maxAudioChannels: '',
audioBoost: '',
enableSubtitles: false,
subtitleSize: '',
updatePlayStatus: false,
streamProtocol: '',
forceDirectPlay: false,
pathReplace: '',
pathReplaceWith: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/api/plex-settings');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
streamPath: '',
enableDebugLogging: false,
directStreamBitrate: '',
transcodeBitrate: '',
mediaBufferSize: '',
transcodeMediaBufferSize: '',
maxPlayableResolution: {
widthPx: '',
heightPx: ''
},
maxTranscodeResolution: {
widthPx: '',
heightPx: ''
},
videoCodecs: [],
audioCodecs: [],
maxAudioChannels: '',
audioBoost: '',
enableSubtitles: false,
subtitleSize: '',
updatePlayStatus: false,
streamProtocol: '',
forceDirectPlay: false,
pathReplace: '',
pathReplaceWith: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/plex-settings',
headers: {'content-type': 'application/json'},
data: {
streamPath: '',
enableDebugLogging: false,
directStreamBitrate: '',
transcodeBitrate: '',
mediaBufferSize: '',
transcodeMediaBufferSize: '',
maxPlayableResolution: {widthPx: '', heightPx: ''},
maxTranscodeResolution: {widthPx: '', heightPx: ''},
videoCodecs: [],
audioCodecs: [],
maxAudioChannels: '',
audioBoost: '',
enableSubtitles: false,
subtitleSize: '',
updatePlayStatus: false,
streamProtocol: '',
forceDirectPlay: false,
pathReplace: '',
pathReplaceWith: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/plex-settings';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"streamPath":"","enableDebugLogging":false,"directStreamBitrate":"","transcodeBitrate":"","mediaBufferSize":"","transcodeMediaBufferSize":"","maxPlayableResolution":{"widthPx":"","heightPx":""},"maxTranscodeResolution":{"widthPx":"","heightPx":""},"videoCodecs":[],"audioCodecs":[],"maxAudioChannels":"","audioBoost":"","enableSubtitles":false,"subtitleSize":"","updatePlayStatus":false,"streamProtocol":"","forceDirectPlay":false,"pathReplace":"","pathReplaceWith":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"streamPath": @"",
@"enableDebugLogging": @NO,
@"directStreamBitrate": @"",
@"transcodeBitrate": @"",
@"mediaBufferSize": @"",
@"transcodeMediaBufferSize": @"",
@"maxPlayableResolution": @{ @"widthPx": @"", @"heightPx": @"" },
@"maxTranscodeResolution": @{ @"widthPx": @"", @"heightPx": @"" },
@"videoCodecs": @[ ],
@"audioCodecs": @[ ],
@"maxAudioChannels": @"",
@"audioBoost": @"",
@"enableSubtitles": @NO,
@"subtitleSize": @"",
@"updatePlayStatus": @NO,
@"streamProtocol": @"",
@"forceDirectPlay": @NO,
@"pathReplace": @"",
@"pathReplaceWith": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/plex-settings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[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}}/api/plex-settings" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"streamPath\": \"\",\n \"enableDebugLogging\": false,\n \"directStreamBitrate\": \"\",\n \"transcodeBitrate\": \"\",\n \"mediaBufferSize\": \"\",\n \"transcodeMediaBufferSize\": \"\",\n \"maxPlayableResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"maxTranscodeResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoCodecs\": [],\n \"audioCodecs\": [],\n \"maxAudioChannels\": \"\",\n \"audioBoost\": \"\",\n \"enableSubtitles\": false,\n \"subtitleSize\": \"\",\n \"updatePlayStatus\": false,\n \"streamProtocol\": \"\",\n \"forceDirectPlay\": false,\n \"pathReplace\": \"\",\n \"pathReplaceWith\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/plex-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'streamPath' => '',
'enableDebugLogging' => null,
'directStreamBitrate' => '',
'transcodeBitrate' => '',
'mediaBufferSize' => '',
'transcodeMediaBufferSize' => '',
'maxPlayableResolution' => [
'widthPx' => '',
'heightPx' => ''
],
'maxTranscodeResolution' => [
'widthPx' => '',
'heightPx' => ''
],
'videoCodecs' => [
],
'audioCodecs' => [
],
'maxAudioChannels' => '',
'audioBoost' => '',
'enableSubtitles' => null,
'subtitleSize' => '',
'updatePlayStatus' => null,
'streamProtocol' => '',
'forceDirectPlay' => null,
'pathReplace' => '',
'pathReplaceWith' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/api/plex-settings', [
'body' => '{
"streamPath": "",
"enableDebugLogging": false,
"directStreamBitrate": "",
"transcodeBitrate": "",
"mediaBufferSize": "",
"transcodeMediaBufferSize": "",
"maxPlayableResolution": {
"widthPx": "",
"heightPx": ""
},
"maxTranscodeResolution": {
"widthPx": "",
"heightPx": ""
},
"videoCodecs": [],
"audioCodecs": [],
"maxAudioChannels": "",
"audioBoost": "",
"enableSubtitles": false,
"subtitleSize": "",
"updatePlayStatus": false,
"streamProtocol": "",
"forceDirectPlay": false,
"pathReplace": "",
"pathReplaceWith": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/plex-settings');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'streamPath' => '',
'enableDebugLogging' => null,
'directStreamBitrate' => '',
'transcodeBitrate' => '',
'mediaBufferSize' => '',
'transcodeMediaBufferSize' => '',
'maxPlayableResolution' => [
'widthPx' => '',
'heightPx' => ''
],
'maxTranscodeResolution' => [
'widthPx' => '',
'heightPx' => ''
],
'videoCodecs' => [
],
'audioCodecs' => [
],
'maxAudioChannels' => '',
'audioBoost' => '',
'enableSubtitles' => null,
'subtitleSize' => '',
'updatePlayStatus' => null,
'streamProtocol' => '',
'forceDirectPlay' => null,
'pathReplace' => '',
'pathReplaceWith' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'streamPath' => '',
'enableDebugLogging' => null,
'directStreamBitrate' => '',
'transcodeBitrate' => '',
'mediaBufferSize' => '',
'transcodeMediaBufferSize' => '',
'maxPlayableResolution' => [
'widthPx' => '',
'heightPx' => ''
],
'maxTranscodeResolution' => [
'widthPx' => '',
'heightPx' => ''
],
'videoCodecs' => [
],
'audioCodecs' => [
],
'maxAudioChannels' => '',
'audioBoost' => '',
'enableSubtitles' => null,
'subtitleSize' => '',
'updatePlayStatus' => null,
'streamProtocol' => '',
'forceDirectPlay' => null,
'pathReplace' => '',
'pathReplaceWith' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/plex-settings');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/plex-settings' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"streamPath": "",
"enableDebugLogging": false,
"directStreamBitrate": "",
"transcodeBitrate": "",
"mediaBufferSize": "",
"transcodeMediaBufferSize": "",
"maxPlayableResolution": {
"widthPx": "",
"heightPx": ""
},
"maxTranscodeResolution": {
"widthPx": "",
"heightPx": ""
},
"videoCodecs": [],
"audioCodecs": [],
"maxAudioChannels": "",
"audioBoost": "",
"enableSubtitles": false,
"subtitleSize": "",
"updatePlayStatus": false,
"streamProtocol": "",
"forceDirectPlay": false,
"pathReplace": "",
"pathReplaceWith": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/plex-settings' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"streamPath": "",
"enableDebugLogging": false,
"directStreamBitrate": "",
"transcodeBitrate": "",
"mediaBufferSize": "",
"transcodeMediaBufferSize": "",
"maxPlayableResolution": {
"widthPx": "",
"heightPx": ""
},
"maxTranscodeResolution": {
"widthPx": "",
"heightPx": ""
},
"videoCodecs": [],
"audioCodecs": [],
"maxAudioChannels": "",
"audioBoost": "",
"enableSubtitles": false,
"subtitleSize": "",
"updatePlayStatus": false,
"streamProtocol": "",
"forceDirectPlay": false,
"pathReplace": "",
"pathReplaceWith": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"streamPath\": \"\",\n \"enableDebugLogging\": false,\n \"directStreamBitrate\": \"\",\n \"transcodeBitrate\": \"\",\n \"mediaBufferSize\": \"\",\n \"transcodeMediaBufferSize\": \"\",\n \"maxPlayableResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"maxTranscodeResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoCodecs\": [],\n \"audioCodecs\": [],\n \"maxAudioChannels\": \"\",\n \"audioBoost\": \"\",\n \"enableSubtitles\": false,\n \"subtitleSize\": \"\",\n \"updatePlayStatus\": false,\n \"streamProtocol\": \"\",\n \"forceDirectPlay\": false,\n \"pathReplace\": \"\",\n \"pathReplaceWith\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/api/plex-settings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/plex-settings"
payload = {
"streamPath": "",
"enableDebugLogging": False,
"directStreamBitrate": "",
"transcodeBitrate": "",
"mediaBufferSize": "",
"transcodeMediaBufferSize": "",
"maxPlayableResolution": {
"widthPx": "",
"heightPx": ""
},
"maxTranscodeResolution": {
"widthPx": "",
"heightPx": ""
},
"videoCodecs": [],
"audioCodecs": [],
"maxAudioChannels": "",
"audioBoost": "",
"enableSubtitles": False,
"subtitleSize": "",
"updatePlayStatus": False,
"streamProtocol": "",
"forceDirectPlay": False,
"pathReplace": "",
"pathReplaceWith": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/plex-settings"
payload <- "{\n \"streamPath\": \"\",\n \"enableDebugLogging\": false,\n \"directStreamBitrate\": \"\",\n \"transcodeBitrate\": \"\",\n \"mediaBufferSize\": \"\",\n \"transcodeMediaBufferSize\": \"\",\n \"maxPlayableResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"maxTranscodeResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoCodecs\": [],\n \"audioCodecs\": [],\n \"maxAudioChannels\": \"\",\n \"audioBoost\": \"\",\n \"enableSubtitles\": false,\n \"subtitleSize\": \"\",\n \"updatePlayStatus\": false,\n \"streamProtocol\": \"\",\n \"forceDirectPlay\": false,\n \"pathReplace\": \"\",\n \"pathReplaceWith\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/plex-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"streamPath\": \"\",\n \"enableDebugLogging\": false,\n \"directStreamBitrate\": \"\",\n \"transcodeBitrate\": \"\",\n \"mediaBufferSize\": \"\",\n \"transcodeMediaBufferSize\": \"\",\n \"maxPlayableResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"maxTranscodeResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoCodecs\": [],\n \"audioCodecs\": [],\n \"maxAudioChannels\": \"\",\n \"audioBoost\": \"\",\n \"enableSubtitles\": false,\n \"subtitleSize\": \"\",\n \"updatePlayStatus\": false,\n \"streamProtocol\": \"\",\n \"forceDirectPlay\": false,\n \"pathReplace\": \"\",\n \"pathReplaceWith\": \"\"\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.put('/baseUrl/api/plex-settings') do |req|
req.body = "{\n \"streamPath\": \"\",\n \"enableDebugLogging\": false,\n \"directStreamBitrate\": \"\",\n \"transcodeBitrate\": \"\",\n \"mediaBufferSize\": \"\",\n \"transcodeMediaBufferSize\": \"\",\n \"maxPlayableResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"maxTranscodeResolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoCodecs\": [],\n \"audioCodecs\": [],\n \"maxAudioChannels\": \"\",\n \"audioBoost\": \"\",\n \"enableSubtitles\": false,\n \"subtitleSize\": \"\",\n \"updatePlayStatus\": false,\n \"streamProtocol\": \"\",\n \"forceDirectPlay\": false,\n \"pathReplace\": \"\",\n \"pathReplaceWith\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/plex-settings";
let payload = json!({
"streamPath": "",
"enableDebugLogging": false,
"directStreamBitrate": "",
"transcodeBitrate": "",
"mediaBufferSize": "",
"transcodeMediaBufferSize": "",
"maxPlayableResolution": json!({
"widthPx": "",
"heightPx": ""
}),
"maxTranscodeResolution": json!({
"widthPx": "",
"heightPx": ""
}),
"videoCodecs": (),
"audioCodecs": (),
"maxAudioChannels": "",
"audioBoost": "",
"enableSubtitles": false,
"subtitleSize": "",
"updatePlayStatus": false,
"streamProtocol": "",
"forceDirectPlay": false,
"pathReplace": "",
"pathReplaceWith": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/api/plex-settings \
--header 'content-type: application/json' \
--data '{
"streamPath": "",
"enableDebugLogging": false,
"directStreamBitrate": "",
"transcodeBitrate": "",
"mediaBufferSize": "",
"transcodeMediaBufferSize": "",
"maxPlayableResolution": {
"widthPx": "",
"heightPx": ""
},
"maxTranscodeResolution": {
"widthPx": "",
"heightPx": ""
},
"videoCodecs": [],
"audioCodecs": [],
"maxAudioChannels": "",
"audioBoost": "",
"enableSubtitles": false,
"subtitleSize": "",
"updatePlayStatus": false,
"streamProtocol": "",
"forceDirectPlay": false,
"pathReplace": "",
"pathReplaceWith": ""
}'
echo '{
"streamPath": "",
"enableDebugLogging": false,
"directStreamBitrate": "",
"transcodeBitrate": "",
"mediaBufferSize": "",
"transcodeMediaBufferSize": "",
"maxPlayableResolution": {
"widthPx": "",
"heightPx": ""
},
"maxTranscodeResolution": {
"widthPx": "",
"heightPx": ""
},
"videoCodecs": [],
"audioCodecs": [],
"maxAudioChannels": "",
"audioBoost": "",
"enableSubtitles": false,
"subtitleSize": "",
"updatePlayStatus": false,
"streamProtocol": "",
"forceDirectPlay": false,
"pathReplace": "",
"pathReplaceWith": ""
}' | \
http PUT {{baseUrl}}/api/plex-settings \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "streamPath": "",\n "enableDebugLogging": false,\n "directStreamBitrate": "",\n "transcodeBitrate": "",\n "mediaBufferSize": "",\n "transcodeMediaBufferSize": "",\n "maxPlayableResolution": {\n "widthPx": "",\n "heightPx": ""\n },\n "maxTranscodeResolution": {\n "widthPx": "",\n "heightPx": ""\n },\n "videoCodecs": [],\n "audioCodecs": [],\n "maxAudioChannels": "",\n "audioBoost": "",\n "enableSubtitles": false,\n "subtitleSize": "",\n "updatePlayStatus": false,\n "streamProtocol": "",\n "forceDirectPlay": false,\n "pathReplace": "",\n "pathReplaceWith": ""\n}' \
--output-document \
- {{baseUrl}}/api/plex-settings
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"streamPath": "",
"enableDebugLogging": false,
"directStreamBitrate": "",
"transcodeBitrate": "",
"mediaBufferSize": "",
"transcodeMediaBufferSize": "",
"maxPlayableResolution": [
"widthPx": "",
"heightPx": ""
],
"maxTranscodeResolution": [
"widthPx": "",
"heightPx": ""
],
"videoCodecs": [],
"audioCodecs": [],
"maxAudioChannels": "",
"audioBoost": "",
"enableSubtitles": false,
"subtitleSize": "",
"updatePlayStatus": false,
"streamProtocol": "",
"forceDirectPlay": false,
"pathReplace": "",
"pathReplaceWith": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/plex-settings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
PUT
put -api-transcode_configs--id
{{baseUrl}}/api/transcode_configs/:id
QUERY PARAMS
id
BODY json
{
"id": "",
"name": "",
"threadCount": "",
"hardwareAccelerationMode": "",
"vaapiDriver": "",
"vaapiDevice": "",
"resolution": {
"widthPx": "",
"heightPx": ""
},
"videoFormat": "",
"videoProfile": "",
"videoPreset": "",
"videoBitDepth": "",
"videoBitRate": "",
"videoBufferSize": "",
"audioChannels": "",
"audioFormat": "",
"audioBitRate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioVolumePercent": "",
"normalizeFrameRate": false,
"deinterlaceVideo": false,
"disableChannelOverlay": false,
"errorScreen": "",
"errorScreenAudio": "",
"isDefault": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/transcode_configs/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"id\": \"\",\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/api/transcode_configs/:id" {:content-type :json
:form-params {:id ""
:name ""
:threadCount ""
:hardwareAccelerationMode ""
:vaapiDriver ""
:vaapiDevice ""
:resolution {:widthPx ""
:heightPx ""}
:videoFormat ""
:videoProfile ""
:videoPreset ""
:videoBitDepth ""
:videoBitRate ""
:videoBufferSize ""
:audioChannels ""
:audioFormat ""
:audioBitRate ""
:audioBufferSize ""
:audioSampleRate ""
:audioVolumePercent ""
:normalizeFrameRate false
:deinterlaceVideo false
:disableChannelOverlay false
:errorScreen ""
:errorScreenAudio ""
:isDefault false}})
require "http/client"
url = "{{baseUrl}}/api/transcode_configs/:id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"id\": \"\",\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/api/transcode_configs/:id"),
Content = new StringContent("{\n \"id\": \"\",\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\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}}/api/transcode_configs/:id");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"id\": \"\",\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/transcode_configs/:id"
payload := strings.NewReader("{\n \"id\": \"\",\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
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))
}
PUT /baseUrl/api/transcode_configs/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 627
{
"id": "",
"name": "",
"threadCount": "",
"hardwareAccelerationMode": "",
"vaapiDriver": "",
"vaapiDevice": "",
"resolution": {
"widthPx": "",
"heightPx": ""
},
"videoFormat": "",
"videoProfile": "",
"videoPreset": "",
"videoBitDepth": "",
"videoBitRate": "",
"videoBufferSize": "",
"audioChannels": "",
"audioFormat": "",
"audioBitRate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioVolumePercent": "",
"normalizeFrameRate": false,
"deinterlaceVideo": false,
"disableChannelOverlay": false,
"errorScreen": "",
"errorScreenAudio": "",
"isDefault": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/api/transcode_configs/:id")
.setHeader("content-type", "application/json")
.setBody("{\n \"id\": \"\",\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/transcode_configs/:id"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"id\": \"\",\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\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 \"id\": \"\",\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/transcode_configs/:id")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/api/transcode_configs/:id")
.header("content-type", "application/json")
.body("{\n \"id\": \"\",\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}")
.asString();
const data = JSON.stringify({
id: '',
name: '',
threadCount: '',
hardwareAccelerationMode: '',
vaapiDriver: '',
vaapiDevice: '',
resolution: {
widthPx: '',
heightPx: ''
},
videoFormat: '',
videoProfile: '',
videoPreset: '',
videoBitDepth: '',
videoBitRate: '',
videoBufferSize: '',
audioChannels: '',
audioFormat: '',
audioBitRate: '',
audioBufferSize: '',
audioSampleRate: '',
audioVolumePercent: '',
normalizeFrameRate: false,
deinterlaceVideo: false,
disableChannelOverlay: false,
errorScreen: '',
errorScreenAudio: '',
isDefault: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/api/transcode_configs/:id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/transcode_configs/:id',
headers: {'content-type': 'application/json'},
data: {
id: '',
name: '',
threadCount: '',
hardwareAccelerationMode: '',
vaapiDriver: '',
vaapiDevice: '',
resolution: {widthPx: '', heightPx: ''},
videoFormat: '',
videoProfile: '',
videoPreset: '',
videoBitDepth: '',
videoBitRate: '',
videoBufferSize: '',
audioChannels: '',
audioFormat: '',
audioBitRate: '',
audioBufferSize: '',
audioSampleRate: '',
audioVolumePercent: '',
normalizeFrameRate: false,
deinterlaceVideo: false,
disableChannelOverlay: false,
errorScreen: '',
errorScreenAudio: '',
isDefault: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/transcode_configs/:id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"id":"","name":"","threadCount":"","hardwareAccelerationMode":"","vaapiDriver":"","vaapiDevice":"","resolution":{"widthPx":"","heightPx":""},"videoFormat":"","videoProfile":"","videoPreset":"","videoBitDepth":"","videoBitRate":"","videoBufferSize":"","audioChannels":"","audioFormat":"","audioBitRate":"","audioBufferSize":"","audioSampleRate":"","audioVolumePercent":"","normalizeFrameRate":false,"deinterlaceVideo":false,"disableChannelOverlay":false,"errorScreen":"","errorScreenAudio":"","isDefault":false}'
};
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}}/api/transcode_configs/:id',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "id": "",\n "name": "",\n "threadCount": "",\n "hardwareAccelerationMode": "",\n "vaapiDriver": "",\n "vaapiDevice": "",\n "resolution": {\n "widthPx": "",\n "heightPx": ""\n },\n "videoFormat": "",\n "videoProfile": "",\n "videoPreset": "",\n "videoBitDepth": "",\n "videoBitRate": "",\n "videoBufferSize": "",\n "audioChannels": "",\n "audioFormat": "",\n "audioBitRate": "",\n "audioBufferSize": "",\n "audioSampleRate": "",\n "audioVolumePercent": "",\n "normalizeFrameRate": false,\n "deinterlaceVideo": false,\n "disableChannelOverlay": false,\n "errorScreen": "",\n "errorScreenAudio": "",\n "isDefault": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"id\": \"\",\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/transcode_configs/:id")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/transcode_configs/:id',
headers: {
'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({
id: '',
name: '',
threadCount: '',
hardwareAccelerationMode: '',
vaapiDriver: '',
vaapiDevice: '',
resolution: {widthPx: '', heightPx: ''},
videoFormat: '',
videoProfile: '',
videoPreset: '',
videoBitDepth: '',
videoBitRate: '',
videoBufferSize: '',
audioChannels: '',
audioFormat: '',
audioBitRate: '',
audioBufferSize: '',
audioSampleRate: '',
audioVolumePercent: '',
normalizeFrameRate: false,
deinterlaceVideo: false,
disableChannelOverlay: false,
errorScreen: '',
errorScreenAudio: '',
isDefault: false
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/transcode_configs/:id',
headers: {'content-type': 'application/json'},
body: {
id: '',
name: '',
threadCount: '',
hardwareAccelerationMode: '',
vaapiDriver: '',
vaapiDevice: '',
resolution: {widthPx: '', heightPx: ''},
videoFormat: '',
videoProfile: '',
videoPreset: '',
videoBitDepth: '',
videoBitRate: '',
videoBufferSize: '',
audioChannels: '',
audioFormat: '',
audioBitRate: '',
audioBufferSize: '',
audioSampleRate: '',
audioVolumePercent: '',
normalizeFrameRate: false,
deinterlaceVideo: false,
disableChannelOverlay: false,
errorScreen: '',
errorScreenAudio: '',
isDefault: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/api/transcode_configs/:id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
id: '',
name: '',
threadCount: '',
hardwareAccelerationMode: '',
vaapiDriver: '',
vaapiDevice: '',
resolution: {
widthPx: '',
heightPx: ''
},
videoFormat: '',
videoProfile: '',
videoPreset: '',
videoBitDepth: '',
videoBitRate: '',
videoBufferSize: '',
audioChannels: '',
audioFormat: '',
audioBitRate: '',
audioBufferSize: '',
audioSampleRate: '',
audioVolumePercent: '',
normalizeFrameRate: false,
deinterlaceVideo: false,
disableChannelOverlay: false,
errorScreen: '',
errorScreenAudio: '',
isDefault: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/transcode_configs/:id',
headers: {'content-type': 'application/json'},
data: {
id: '',
name: '',
threadCount: '',
hardwareAccelerationMode: '',
vaapiDriver: '',
vaapiDevice: '',
resolution: {widthPx: '', heightPx: ''},
videoFormat: '',
videoProfile: '',
videoPreset: '',
videoBitDepth: '',
videoBitRate: '',
videoBufferSize: '',
audioChannels: '',
audioFormat: '',
audioBitRate: '',
audioBufferSize: '',
audioSampleRate: '',
audioVolumePercent: '',
normalizeFrameRate: false,
deinterlaceVideo: false,
disableChannelOverlay: false,
errorScreen: '',
errorScreenAudio: '',
isDefault: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/transcode_configs/:id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"id":"","name":"","threadCount":"","hardwareAccelerationMode":"","vaapiDriver":"","vaapiDevice":"","resolution":{"widthPx":"","heightPx":""},"videoFormat":"","videoProfile":"","videoPreset":"","videoBitDepth":"","videoBitRate":"","videoBufferSize":"","audioChannels":"","audioFormat":"","audioBitRate":"","audioBufferSize":"","audioSampleRate":"","audioVolumePercent":"","normalizeFrameRate":false,"deinterlaceVideo":false,"disableChannelOverlay":false,"errorScreen":"","errorScreenAudio":"","isDefault":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"id": @"",
@"name": @"",
@"threadCount": @"",
@"hardwareAccelerationMode": @"",
@"vaapiDriver": @"",
@"vaapiDevice": @"",
@"resolution": @{ @"widthPx": @"", @"heightPx": @"" },
@"videoFormat": @"",
@"videoProfile": @"",
@"videoPreset": @"",
@"videoBitDepth": @"",
@"videoBitRate": @"",
@"videoBufferSize": @"",
@"audioChannels": @"",
@"audioFormat": @"",
@"audioBitRate": @"",
@"audioBufferSize": @"",
@"audioSampleRate": @"",
@"audioVolumePercent": @"",
@"normalizeFrameRate": @NO,
@"deinterlaceVideo": @NO,
@"disableChannelOverlay": @NO,
@"errorScreen": @"",
@"errorScreenAudio": @"",
@"isDefault": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/transcode_configs/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[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}}/api/transcode_configs/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"id\": \"\",\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/transcode_configs/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => '',
'name' => '',
'threadCount' => '',
'hardwareAccelerationMode' => '',
'vaapiDriver' => '',
'vaapiDevice' => '',
'resolution' => [
'widthPx' => '',
'heightPx' => ''
],
'videoFormat' => '',
'videoProfile' => '',
'videoPreset' => '',
'videoBitDepth' => '',
'videoBitRate' => '',
'videoBufferSize' => '',
'audioChannels' => '',
'audioFormat' => '',
'audioBitRate' => '',
'audioBufferSize' => '',
'audioSampleRate' => '',
'audioVolumePercent' => '',
'normalizeFrameRate' => null,
'deinterlaceVideo' => null,
'disableChannelOverlay' => null,
'errorScreen' => '',
'errorScreenAudio' => '',
'isDefault' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/api/transcode_configs/:id', [
'body' => '{
"id": "",
"name": "",
"threadCount": "",
"hardwareAccelerationMode": "",
"vaapiDriver": "",
"vaapiDevice": "",
"resolution": {
"widthPx": "",
"heightPx": ""
},
"videoFormat": "",
"videoProfile": "",
"videoPreset": "",
"videoBitDepth": "",
"videoBitRate": "",
"videoBufferSize": "",
"audioChannels": "",
"audioFormat": "",
"audioBitRate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioVolumePercent": "",
"normalizeFrameRate": false,
"deinterlaceVideo": false,
"disableChannelOverlay": false,
"errorScreen": "",
"errorScreenAudio": "",
"isDefault": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/transcode_configs/:id');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'id' => '',
'name' => '',
'threadCount' => '',
'hardwareAccelerationMode' => '',
'vaapiDriver' => '',
'vaapiDevice' => '',
'resolution' => [
'widthPx' => '',
'heightPx' => ''
],
'videoFormat' => '',
'videoProfile' => '',
'videoPreset' => '',
'videoBitDepth' => '',
'videoBitRate' => '',
'videoBufferSize' => '',
'audioChannels' => '',
'audioFormat' => '',
'audioBitRate' => '',
'audioBufferSize' => '',
'audioSampleRate' => '',
'audioVolumePercent' => '',
'normalizeFrameRate' => null,
'deinterlaceVideo' => null,
'disableChannelOverlay' => null,
'errorScreen' => '',
'errorScreenAudio' => '',
'isDefault' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'id' => '',
'name' => '',
'threadCount' => '',
'hardwareAccelerationMode' => '',
'vaapiDriver' => '',
'vaapiDevice' => '',
'resolution' => [
'widthPx' => '',
'heightPx' => ''
],
'videoFormat' => '',
'videoProfile' => '',
'videoPreset' => '',
'videoBitDepth' => '',
'videoBitRate' => '',
'videoBufferSize' => '',
'audioChannels' => '',
'audioFormat' => '',
'audioBitRate' => '',
'audioBufferSize' => '',
'audioSampleRate' => '',
'audioVolumePercent' => '',
'normalizeFrameRate' => null,
'deinterlaceVideo' => null,
'disableChannelOverlay' => null,
'errorScreen' => '',
'errorScreenAudio' => '',
'isDefault' => null
]));
$request->setRequestUrl('{{baseUrl}}/api/transcode_configs/:id');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/transcode_configs/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"id": "",
"name": "",
"threadCount": "",
"hardwareAccelerationMode": "",
"vaapiDriver": "",
"vaapiDevice": "",
"resolution": {
"widthPx": "",
"heightPx": ""
},
"videoFormat": "",
"videoProfile": "",
"videoPreset": "",
"videoBitDepth": "",
"videoBitRate": "",
"videoBufferSize": "",
"audioChannels": "",
"audioFormat": "",
"audioBitRate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioVolumePercent": "",
"normalizeFrameRate": false,
"deinterlaceVideo": false,
"disableChannelOverlay": false,
"errorScreen": "",
"errorScreenAudio": "",
"isDefault": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/transcode_configs/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"id": "",
"name": "",
"threadCount": "",
"hardwareAccelerationMode": "",
"vaapiDriver": "",
"vaapiDevice": "",
"resolution": {
"widthPx": "",
"heightPx": ""
},
"videoFormat": "",
"videoProfile": "",
"videoPreset": "",
"videoBitDepth": "",
"videoBitRate": "",
"videoBufferSize": "",
"audioChannels": "",
"audioFormat": "",
"audioBitRate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioVolumePercent": "",
"normalizeFrameRate": false,
"deinterlaceVideo": false,
"disableChannelOverlay": false,
"errorScreen": "",
"errorScreenAudio": "",
"isDefault": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"id\": \"\",\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/api/transcode_configs/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/transcode_configs/:id"
payload = {
"id": "",
"name": "",
"threadCount": "",
"hardwareAccelerationMode": "",
"vaapiDriver": "",
"vaapiDevice": "",
"resolution": {
"widthPx": "",
"heightPx": ""
},
"videoFormat": "",
"videoProfile": "",
"videoPreset": "",
"videoBitDepth": "",
"videoBitRate": "",
"videoBufferSize": "",
"audioChannels": "",
"audioFormat": "",
"audioBitRate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioVolumePercent": "",
"normalizeFrameRate": False,
"deinterlaceVideo": False,
"disableChannelOverlay": False,
"errorScreen": "",
"errorScreenAudio": "",
"isDefault": False
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/transcode_configs/:id"
payload <- "{\n \"id\": \"\",\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/transcode_configs/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"id\": \"\",\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\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.put('/baseUrl/api/transcode_configs/:id') do |req|
req.body = "{\n \"id\": \"\",\n \"name\": \"\",\n \"threadCount\": \"\",\n \"hardwareAccelerationMode\": \"\",\n \"vaapiDriver\": \"\",\n \"vaapiDevice\": \"\",\n \"resolution\": {\n \"widthPx\": \"\",\n \"heightPx\": \"\"\n },\n \"videoFormat\": \"\",\n \"videoProfile\": \"\",\n \"videoPreset\": \"\",\n \"videoBitDepth\": \"\",\n \"videoBitRate\": \"\",\n \"videoBufferSize\": \"\",\n \"audioChannels\": \"\",\n \"audioFormat\": \"\",\n \"audioBitRate\": \"\",\n \"audioBufferSize\": \"\",\n \"audioSampleRate\": \"\",\n \"audioVolumePercent\": \"\",\n \"normalizeFrameRate\": false,\n \"deinterlaceVideo\": false,\n \"disableChannelOverlay\": false,\n \"errorScreen\": \"\",\n \"errorScreenAudio\": \"\",\n \"isDefault\": false\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/transcode_configs/:id";
let payload = json!({
"id": "",
"name": "",
"threadCount": "",
"hardwareAccelerationMode": "",
"vaapiDriver": "",
"vaapiDevice": "",
"resolution": json!({
"widthPx": "",
"heightPx": ""
}),
"videoFormat": "",
"videoProfile": "",
"videoPreset": "",
"videoBitDepth": "",
"videoBitRate": "",
"videoBufferSize": "",
"audioChannels": "",
"audioFormat": "",
"audioBitRate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioVolumePercent": "",
"normalizeFrameRate": false,
"deinterlaceVideo": false,
"disableChannelOverlay": false,
"errorScreen": "",
"errorScreenAudio": "",
"isDefault": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/api/transcode_configs/:id \
--header 'content-type: application/json' \
--data '{
"id": "",
"name": "",
"threadCount": "",
"hardwareAccelerationMode": "",
"vaapiDriver": "",
"vaapiDevice": "",
"resolution": {
"widthPx": "",
"heightPx": ""
},
"videoFormat": "",
"videoProfile": "",
"videoPreset": "",
"videoBitDepth": "",
"videoBitRate": "",
"videoBufferSize": "",
"audioChannels": "",
"audioFormat": "",
"audioBitRate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioVolumePercent": "",
"normalizeFrameRate": false,
"deinterlaceVideo": false,
"disableChannelOverlay": false,
"errorScreen": "",
"errorScreenAudio": "",
"isDefault": false
}'
echo '{
"id": "",
"name": "",
"threadCount": "",
"hardwareAccelerationMode": "",
"vaapiDriver": "",
"vaapiDevice": "",
"resolution": {
"widthPx": "",
"heightPx": ""
},
"videoFormat": "",
"videoProfile": "",
"videoPreset": "",
"videoBitDepth": "",
"videoBitRate": "",
"videoBufferSize": "",
"audioChannels": "",
"audioFormat": "",
"audioBitRate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioVolumePercent": "",
"normalizeFrameRate": false,
"deinterlaceVideo": false,
"disableChannelOverlay": false,
"errorScreen": "",
"errorScreenAudio": "",
"isDefault": false
}' | \
http PUT {{baseUrl}}/api/transcode_configs/:id \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "id": "",\n "name": "",\n "threadCount": "",\n "hardwareAccelerationMode": "",\n "vaapiDriver": "",\n "vaapiDevice": "",\n "resolution": {\n "widthPx": "",\n "heightPx": ""\n },\n "videoFormat": "",\n "videoProfile": "",\n "videoPreset": "",\n "videoBitDepth": "",\n "videoBitRate": "",\n "videoBufferSize": "",\n "audioChannels": "",\n "audioFormat": "",\n "audioBitRate": "",\n "audioBufferSize": "",\n "audioSampleRate": "",\n "audioVolumePercent": "",\n "normalizeFrameRate": false,\n "deinterlaceVideo": false,\n "disableChannelOverlay": false,\n "errorScreen": "",\n "errorScreenAudio": "",\n "isDefault": false\n}' \
--output-document \
- {{baseUrl}}/api/transcode_configs/:id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"id": "",
"name": "",
"threadCount": "",
"hardwareAccelerationMode": "",
"vaapiDriver": "",
"vaapiDevice": "",
"resolution": [
"widthPx": "",
"heightPx": ""
],
"videoFormat": "",
"videoProfile": "",
"videoPreset": "",
"videoBitDepth": "",
"videoBitRate": "",
"videoBufferSize": "",
"audioChannels": "",
"audioFormat": "",
"audioBitRate": "",
"audioBufferSize": "",
"audioSampleRate": "",
"audioVolumePercent": "",
"normalizeFrameRate": false,
"deinterlaceVideo": false,
"disableChannelOverlay": false,
"errorScreen": "",
"errorScreenAudio": "",
"isDefault": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/transcode_configs/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
PUT
put -api-xmltv-settings
{{baseUrl}}/api/xmltv-settings
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/xmltv-settings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/api/xmltv-settings")
require "http/client"
url = "{{baseUrl}}/api/xmltv-settings"
response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/api/xmltv-settings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/xmltv-settings");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/xmltv-settings"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/api/xmltv-settings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/api/xmltv-settings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/xmltv-settings"))
.method("PUT", 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}}/api/xmltv-settings")
.put(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/api/xmltv-settings")
.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('PUT', '{{baseUrl}}/api/xmltv-settings');
xhr.send(data);
import axios from 'axios';
const options = {method: 'PUT', url: '{{baseUrl}}/api/xmltv-settings'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/xmltv-settings';
const options = {method: 'PUT'};
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}}/api/xmltv-settings',
method: 'PUT',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/xmltv-settings")
.put(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/xmltv-settings',
headers: {}
};
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: 'PUT', url: '{{baseUrl}}/api/xmltv-settings'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/api/xmltv-settings');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'PUT', url: '{{baseUrl}}/api/xmltv-settings'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/xmltv-settings';
const options = {method: 'PUT'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/xmltv-settings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
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}}/api/xmltv-settings" in
Client.call `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/xmltv-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/api/xmltv-settings');
echo $response->getBody();
setUrl('{{baseUrl}}/api/xmltv-settings');
$request->setMethod(HTTP_METH_PUT);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/xmltv-settings');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/xmltv-settings' -Method PUT
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/xmltv-settings' -Method PUT
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("PUT", "/baseUrl/api/xmltv-settings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/xmltv-settings"
response = requests.put(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/xmltv-settings"
response <- VERB("PUT", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/xmltv-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.put('/baseUrl/api/xmltv-settings') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/xmltv-settings";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/api/xmltv-settings
http PUT {{baseUrl}}/api/xmltv-settings
wget --quiet \
--method PUT \
--output-document \
- {{baseUrl}}/api/xmltv-settings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/xmltv-settings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
DELETE
Clears the channels m3u cache
{{baseUrl}}/api/channels.m3u
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/channels.m3u");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/api/channels.m3u")
require "http/client"
url = "{{baseUrl}}/api/channels.m3u"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/api/channels.m3u"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/channels.m3u");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/channels.m3u"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/api/channels.m3u HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/api/channels.m3u")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/channels.m3u"))
.method("DELETE", 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}}/api/channels.m3u")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/api/channels.m3u")
.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('DELETE', '{{baseUrl}}/api/channels.m3u');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/api/channels.m3u'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/channels.m3u';
const options = {method: 'DELETE'};
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}}/api/channels.m3u',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/channels.m3u")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/channels.m3u',
headers: {}
};
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: 'DELETE', url: '{{baseUrl}}/api/channels.m3u'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/api/channels.m3u');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/api/channels.m3u'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/channels.m3u';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/channels.m3u"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
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}}/api/channels.m3u" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/channels.m3u",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/api/channels.m3u');
echo $response->getBody();
setUrl('{{baseUrl}}/api/channels.m3u');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/channels.m3u');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/channels.m3u' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/channels.m3u' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/api/channels.m3u")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/channels.m3u"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/channels.m3u"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/channels.m3u")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/api/channels.m3u') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/channels.m3u";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/api/channels.m3u
http DELETE {{baseUrl}}/api/channels.m3u
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/api/channels.m3u
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/channels.m3u")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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
Return a playlist in ffconcat file format for the given channel
{{baseUrl}}/ffmpeg/playlist
QUERY PARAMS
channel
mode
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ffmpeg/playlist?channel=&mode=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/ffmpeg/playlist" {:query-params {:channel ""
:mode ""}})
require "http/client"
url = "{{baseUrl}}/ffmpeg/playlist?channel=&mode="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/ffmpeg/playlist?channel=&mode="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/ffmpeg/playlist?channel=&mode=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ffmpeg/playlist?channel=&mode="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/ffmpeg/playlist?channel=&mode= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/ffmpeg/playlist?channel=&mode=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ffmpeg/playlist?channel=&mode="))
.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}}/ffmpeg/playlist?channel=&mode=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/ffmpeg/playlist?channel=&mode=")
.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}}/ffmpeg/playlist?channel=&mode=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/ffmpeg/playlist',
params: {channel: '', mode: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ffmpeg/playlist?channel=&mode=';
const options = {method: 'GET'};
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}}/ffmpeg/playlist?channel=&mode=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/ffmpeg/playlist?channel=&mode=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/ffmpeg/playlist?channel=&mode=',
headers: {}
};
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}}/ffmpeg/playlist',
qs: {channel: '', mode: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/ffmpeg/playlist');
req.query({
channel: '',
mode: ''
});
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}}/ffmpeg/playlist',
params: {channel: '', mode: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ffmpeg/playlist?channel=&mode=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/ffmpeg/playlist?channel=&mode="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/ffmpeg/playlist?channel=&mode=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ffmpeg/playlist?channel=&mode=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/ffmpeg/playlist?channel=&mode=');
echo $response->getBody();
setUrl('{{baseUrl}}/ffmpeg/playlist');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'channel' => '',
'mode' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/ffmpeg/playlist');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'channel' => '',
'mode' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ffmpeg/playlist?channel=&mode=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ffmpeg/playlist?channel=&mode=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/ffmpeg/playlist?channel=&mode=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ffmpeg/playlist"
querystring = {"channel":"","mode":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ffmpeg/playlist"
queryString <- list(
channel = "",
mode = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ffmpeg/playlist?channel=&mode=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/ffmpeg/playlist') do |req|
req.params['channel'] = ''
req.params['mode'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ffmpeg/playlist";
let querystring = [
("channel", ""),
("mode", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/ffmpeg/playlist?channel=&mode='
http GET '{{baseUrl}}/ffmpeg/playlist?channel=&mode='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/ffmpeg/playlist?channel=&mode='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ffmpeg/playlist?channel=&mode=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
Returns a continuous, direct MPEGTS video stream for the given channel
{{baseUrl}}/stream/channels/:id.ts
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/stream/channels/:id.ts");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/stream/channels/:id.ts")
require "http/client"
url = "{{baseUrl}}/stream/channels/:id.ts"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/stream/channels/:id.ts"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/stream/channels/:id.ts");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/stream/channels/:id.ts"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/stream/channels/:id.ts HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/stream/channels/:id.ts")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/stream/channels/:id.ts"))
.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}}/stream/channels/:id.ts")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/stream/channels/:id.ts")
.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}}/stream/channels/:id.ts');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/stream/channels/:id.ts'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/stream/channels/:id.ts';
const options = {method: 'GET'};
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}}/stream/channels/:id.ts',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/stream/channels/:id.ts")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/stream/channels/:id.ts',
headers: {}
};
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}}/stream/channels/:id.ts'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/stream/channels/:id.ts');
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}}/stream/channels/:id.ts'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/stream/channels/:id.ts';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/stream/channels/:id.ts"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/stream/channels/:id.ts" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/stream/channels/:id.ts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/stream/channels/:id.ts');
echo $response->getBody();
setUrl('{{baseUrl}}/stream/channels/:id.ts');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/stream/channels/:id.ts');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/stream/channels/:id.ts' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/stream/channels/:id.ts' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/stream/channels/:id.ts")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/stream/channels/:id.ts"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/stream/channels/:id.ts"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/stream/channels/:id.ts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/stream/channels/:id.ts') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/stream/channels/:id.ts";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/stream/channels/:id.ts
http GET {{baseUrl}}/stream/channels/:id.ts
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/stream/channels/:id.ts
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/stream/channels/:id.ts")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-channels.m3u
{{baseUrl}}/api/channels.m3u
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/channels.m3u");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/channels.m3u")
require "http/client"
url = "{{baseUrl}}/api/channels.m3u"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/channels.m3u"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/channels.m3u");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/channels.m3u"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/channels.m3u HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/channels.m3u")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/channels.m3u"))
.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}}/api/channels.m3u")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/channels.m3u")
.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}}/api/channels.m3u');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/channels.m3u'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/channels.m3u';
const options = {method: 'GET'};
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}}/api/channels.m3u',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/channels.m3u")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/channels.m3u',
headers: {}
};
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}}/api/channels.m3u'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/channels.m3u');
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}}/api/channels.m3u'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/channels.m3u';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/channels.m3u"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/channels.m3u" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/channels.m3u",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/channels.m3u');
echo $response->getBody();
setUrl('{{baseUrl}}/api/channels.m3u');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/channels.m3u');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/channels.m3u' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/channels.m3u' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/channels.m3u")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/channels.m3u"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/channels.m3u"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/channels.m3u")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/channels.m3u') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/channels.m3u";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/channels.m3u
http GET {{baseUrl}}/api/channels.m3u
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/channels.m3u
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/channels.m3u")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-xmltv.xml
{{baseUrl}}/api/xmltv.xml
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/xmltv.xml");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/xmltv.xml")
require "http/client"
url = "{{baseUrl}}/api/xmltv.xml"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/xmltv.xml"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/xmltv.xml");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/xmltv.xml"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/xmltv.xml HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/xmltv.xml")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/xmltv.xml"))
.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}}/api/xmltv.xml")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/xmltv.xml")
.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}}/api/xmltv.xml');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/xmltv.xml'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/xmltv.xml';
const options = {method: 'GET'};
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}}/api/xmltv.xml',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/xmltv.xml")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/xmltv.xml',
headers: {}
};
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}}/api/xmltv.xml'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/xmltv.xml');
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}}/api/xmltv.xml'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/xmltv.xml';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/xmltv.xml"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/xmltv.xml" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/xmltv.xml",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/xmltv.xml');
echo $response->getBody();
setUrl('{{baseUrl}}/api/xmltv.xml');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/xmltv.xml');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/xmltv.xml' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/xmltv.xml' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/xmltv.xml")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/xmltv.xml"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/xmltv.xml"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/xmltv.xml")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/xmltv.xml') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/xmltv.xml";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/xmltv.xml
http GET {{baseUrl}}/api/xmltv.xml
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/xmltv.xml
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/xmltv.xml")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -stream-channels--id
{{baseUrl}}/stream/channels/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/stream/channels/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/stream/channels/:id")
require "http/client"
url = "{{baseUrl}}/stream/channels/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/stream/channels/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/stream/channels/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/stream/channels/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/stream/channels/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/stream/channels/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/stream/channels/:id"))
.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}}/stream/channels/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/stream/channels/:id")
.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}}/stream/channels/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/stream/channels/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/stream/channels/:id';
const options = {method: 'GET'};
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}}/stream/channels/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/stream/channels/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/stream/channels/:id',
headers: {}
};
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}}/stream/channels/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/stream/channels/:id');
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}}/stream/channels/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/stream/channels/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/stream/channels/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/stream/channels/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/stream/channels/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/stream/channels/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/stream/channels/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/stream/channels/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/stream/channels/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/stream/channels/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/stream/channels/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/stream/channels/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/stream/channels/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/stream/channels/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/stream/channels/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/stream/channels/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/stream/channels/:id
http GET {{baseUrl}}/stream/channels/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/stream/channels/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/stream/channels/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -stream-channels--id.m3u8
{{baseUrl}}/stream/channels/:id.m3u8
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/stream/channels/:id.m3u8");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/stream/channels/:id.m3u8")
require "http/client"
url = "{{baseUrl}}/stream/channels/:id.m3u8"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/stream/channels/:id.m3u8"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/stream/channels/:id.m3u8");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/stream/channels/:id.m3u8"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/stream/channels/:id.m3u8 HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/stream/channels/:id.m3u8")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/stream/channels/:id.m3u8"))
.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}}/stream/channels/:id.m3u8")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/stream/channels/:id.m3u8")
.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}}/stream/channels/:id.m3u8');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/stream/channels/:id.m3u8'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/stream/channels/:id.m3u8';
const options = {method: 'GET'};
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}}/stream/channels/:id.m3u8',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/stream/channels/:id.m3u8")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/stream/channels/:id.m3u8',
headers: {}
};
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}}/stream/channels/:id.m3u8'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/stream/channels/:id.m3u8');
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}}/stream/channels/:id.m3u8'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/stream/channels/:id.m3u8';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/stream/channels/:id.m3u8"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/stream/channels/:id.m3u8" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/stream/channels/:id.m3u8",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/stream/channels/:id.m3u8');
echo $response->getBody();
setUrl('{{baseUrl}}/stream/channels/:id.m3u8');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/stream/channels/:id.m3u8');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/stream/channels/:id.m3u8' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/stream/channels/:id.m3u8' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/stream/channels/:id.m3u8")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/stream/channels/:id.m3u8"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/stream/channels/:id.m3u8"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/stream/channels/:id.m3u8")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/stream/channels/:id.m3u8') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/stream/channels/:id.m3u8";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/stream/channels/:id.m3u8
http GET {{baseUrl}}/stream/channels/:id.m3u8
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/stream/channels/:id.m3u8
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/stream/channels/:id.m3u8")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
HEAD
head -api-channels.m3u
{{baseUrl}}/api/channels.m3u
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "HEAD");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/channels.m3u");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/head "{{baseUrl}}/api/channels.m3u")
require "http/client"
url = "{{baseUrl}}/api/channels.m3u"
response = HTTP::Client.head url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Head,
RequestUri = new Uri("{{baseUrl}}/api/channels.m3u"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/channels.m3u");
var request = new RestRequest("", Method.Head);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/channels.m3u"
req, _ := http.NewRequest("HEAD", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
HEAD /baseUrl/api/channels.m3u HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("HEAD", "{{baseUrl}}/api/channels.m3u")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/channels.m3u"))
.method("HEAD", 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}}/api/channels.m3u")
.head()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.head("{{baseUrl}}/api/channels.m3u")
.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('HEAD', '{{baseUrl}}/api/channels.m3u');
xhr.send(data);
import axios from 'axios';
const options = {method: 'HEAD', url: '{{baseUrl}}/api/channels.m3u'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/channels.m3u';
const options = {method: 'HEAD'};
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}}/api/channels.m3u',
method: 'HEAD',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/channels.m3u")
.head()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'HEAD',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/channels.m3u',
headers: {}
};
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: 'HEAD', url: '{{baseUrl}}/api/channels.m3u'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('HEAD', '{{baseUrl}}/api/channels.m3u');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'HEAD', url: '{{baseUrl}}/api/channels.m3u'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/channels.m3u';
const options = {method: 'HEAD'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/channels.m3u"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"HEAD"];
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}}/api/channels.m3u" in
Client.call `HEAD uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/channels.m3u",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "HEAD",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('HEAD', '{{baseUrl}}/api/channels.m3u');
echo $response->getBody();
setUrl('{{baseUrl}}/api/channels.m3u');
$request->setMethod(HTTP_METH_HEAD);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/channels.m3u');
$request->setRequestMethod('HEAD');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/channels.m3u' -Method HEAD
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/channels.m3u' -Method HEAD
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("HEAD", "/baseUrl/api/channels.m3u")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/channels.m3u"
response = requests.head(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/channels.m3u"
response <- VERB("HEAD", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/channels.m3u")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Head.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.head('/baseUrl/api/channels.m3u') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/channels.m3u";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("HEAD").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request HEAD \
--url {{baseUrl}}/api/channels.m3u
http HEAD {{baseUrl}}/api/channels.m3u
wget --quiet \
--method HEAD \
--output-document \
- {{baseUrl}}/api/channels.m3u
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/channels.m3u")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "HEAD"
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()
HEAD
head -api-xmltv.xml
{{baseUrl}}/api/xmltv.xml
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "HEAD");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/xmltv.xml");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/head "{{baseUrl}}/api/xmltv.xml")
require "http/client"
url = "{{baseUrl}}/api/xmltv.xml"
response = HTTP::Client.head url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Head,
RequestUri = new Uri("{{baseUrl}}/api/xmltv.xml"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/xmltv.xml");
var request = new RestRequest("", Method.Head);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/xmltv.xml"
req, _ := http.NewRequest("HEAD", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
HEAD /baseUrl/api/xmltv.xml HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("HEAD", "{{baseUrl}}/api/xmltv.xml")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/xmltv.xml"))
.method("HEAD", 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}}/api/xmltv.xml")
.head()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.head("{{baseUrl}}/api/xmltv.xml")
.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('HEAD', '{{baseUrl}}/api/xmltv.xml');
xhr.send(data);
import axios from 'axios';
const options = {method: 'HEAD', url: '{{baseUrl}}/api/xmltv.xml'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/xmltv.xml';
const options = {method: 'HEAD'};
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}}/api/xmltv.xml',
method: 'HEAD',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/xmltv.xml")
.head()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'HEAD',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/xmltv.xml',
headers: {}
};
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: 'HEAD', url: '{{baseUrl}}/api/xmltv.xml'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('HEAD', '{{baseUrl}}/api/xmltv.xml');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'HEAD', url: '{{baseUrl}}/api/xmltv.xml'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/xmltv.xml';
const options = {method: 'HEAD'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/xmltv.xml"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"HEAD"];
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}}/api/xmltv.xml" in
Client.call `HEAD uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/xmltv.xml",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "HEAD",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('HEAD', '{{baseUrl}}/api/xmltv.xml');
echo $response->getBody();
setUrl('{{baseUrl}}/api/xmltv.xml');
$request->setMethod(HTTP_METH_HEAD);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/xmltv.xml');
$request->setRequestMethod('HEAD');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/xmltv.xml' -Method HEAD
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/xmltv.xml' -Method HEAD
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("HEAD", "/baseUrl/api/xmltv.xml")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/xmltv.xml"
response = requests.head(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/xmltv.xml"
response <- VERB("HEAD", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/xmltv.xml")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Head.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.head('/baseUrl/api/xmltv.xml') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/xmltv.xml";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("HEAD").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request HEAD \
--url {{baseUrl}}/api/xmltv.xml
http HEAD {{baseUrl}}/api/xmltv.xml
wget --quiet \
--method HEAD \
--output-document \
- {{baseUrl}}/api/xmltv.xml
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/xmltv.xml")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "HEAD"
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
get -api-ffmpeg-info
{{baseUrl}}/api/ffmpeg-info
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/ffmpeg-info");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/ffmpeg-info")
require "http/client"
url = "{{baseUrl}}/api/ffmpeg-info"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/ffmpeg-info"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/ffmpeg-info");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/ffmpeg-info"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/ffmpeg-info HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/ffmpeg-info")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/ffmpeg-info"))
.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}}/api/ffmpeg-info")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/ffmpeg-info")
.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}}/api/ffmpeg-info');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/ffmpeg-info'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/ffmpeg-info';
const options = {method: 'GET'};
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}}/api/ffmpeg-info',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/ffmpeg-info")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/ffmpeg-info',
headers: {}
};
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}}/api/ffmpeg-info'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/ffmpeg-info');
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}}/api/ffmpeg-info'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/ffmpeg-info';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/ffmpeg-info"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/ffmpeg-info" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/ffmpeg-info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/ffmpeg-info');
echo $response->getBody();
setUrl('{{baseUrl}}/api/ffmpeg-info');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/ffmpeg-info');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/ffmpeg-info' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/ffmpeg-info' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/ffmpeg-info")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/ffmpeg-info"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/ffmpeg-info"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/ffmpeg-info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/ffmpeg-info') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/ffmpeg-info";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/ffmpeg-info
http GET {{baseUrl}}/api/ffmpeg-info
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/ffmpeg-info
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/ffmpeg-info")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-jobs
{{baseUrl}}/api/jobs
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/jobs");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/jobs")
require "http/client"
url = "{{baseUrl}}/api/jobs"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/jobs"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/jobs");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/jobs"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/jobs HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/jobs")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/jobs"))
.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}}/api/jobs")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/jobs")
.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}}/api/jobs');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/jobs'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/jobs';
const options = {method: 'GET'};
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}}/api/jobs',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/jobs")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/jobs',
headers: {}
};
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}}/api/jobs'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/jobs');
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}}/api/jobs'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/jobs';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/jobs"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/jobs" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/jobs');
echo $response->getBody();
setUrl('{{baseUrl}}/api/jobs');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/jobs');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/jobs' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/jobs' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/jobs")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/jobs"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/jobs"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/jobs') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/jobs";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/jobs
http GET {{baseUrl}}/api/jobs
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/jobs
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/jobs")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-system-health
{{baseUrl}}/api/system/health
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/system/health");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/system/health")
require "http/client"
url = "{{baseUrl}}/api/system/health"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/system/health"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/system/health");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/system/health"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/system/health HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/system/health")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/system/health"))
.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}}/api/system/health")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/system/health")
.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}}/api/system/health');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/system/health'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/system/health';
const options = {method: 'GET'};
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}}/api/system/health',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/system/health")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/system/health',
headers: {}
};
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}}/api/system/health'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/system/health');
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}}/api/system/health'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/system/health';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/system/health"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/system/health" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/system/health",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/system/health');
echo $response->getBody();
setUrl('{{baseUrl}}/api/system/health');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/system/health');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/system/health' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/system/health' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/system/health")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/system/health"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/system/health"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/system/health")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/system/health') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/system/health";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/system/health
http GET {{baseUrl}}/api/system/health
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/system/health
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/system/health")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-system-settings
{{baseUrl}}/api/system/settings
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/system/settings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/system/settings")
require "http/client"
url = "{{baseUrl}}/api/system/settings"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/system/settings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/system/settings");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/system/settings"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/system/settings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/system/settings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/system/settings"))
.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}}/api/system/settings")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/system/settings")
.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}}/api/system/settings');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/system/settings'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/system/settings';
const options = {method: 'GET'};
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}}/api/system/settings',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/system/settings")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/system/settings',
headers: {}
};
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}}/api/system/settings'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/system/settings');
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}}/api/system/settings'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/system/settings';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/system/settings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/system/settings" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/system/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/system/settings');
echo $response->getBody();
setUrl('{{baseUrl}}/api/system/settings');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/system/settings');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/system/settings' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/system/settings' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/system/settings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/system/settings"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/system/settings"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/system/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/system/settings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/system/settings";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/system/settings
http GET {{baseUrl}}/api/system/settings
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/system/settings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/system/settings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-system-state
{{baseUrl}}/api/system/state
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/system/state");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/system/state")
require "http/client"
url = "{{baseUrl}}/api/system/state"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/system/state"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/system/state");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/system/state"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/system/state HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/system/state")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/system/state"))
.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}}/api/system/state")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/system/state")
.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}}/api/system/state');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/system/state'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/system/state';
const options = {method: 'GET'};
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}}/api/system/state',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/system/state")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/system/state',
headers: {}
};
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}}/api/system/state'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/system/state');
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}}/api/system/state'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/system/state';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/system/state"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/system/state" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/system/state",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/system/state');
echo $response->getBody();
setUrl('{{baseUrl}}/api/system/state');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/system/state');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/system/state' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/system/state' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/system/state")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/system/state"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/system/state"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/system/state")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/system/state') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/system/state";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/system/state
http GET {{baseUrl}}/api/system/state
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/system/state
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/system/state")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-version
{{baseUrl}}/api/version
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/version");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/version")
require "http/client"
url = "{{baseUrl}}/api/version"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/version"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/version");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/version"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/version HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/version")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/version"))
.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}}/api/version")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/version")
.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}}/api/version');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/version'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/version';
const options = {method: 'GET'};
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}}/api/version',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/version")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/version',
headers: {}
};
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}}/api/version'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/version');
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}}/api/version'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/version';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/version"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/version" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/version",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/version');
echo $response->getBody();
setUrl('{{baseUrl}}/api/version');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/version');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/version' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/version' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/version")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/version"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/version"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/version")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/version') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/version";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/version
http GET {{baseUrl}}/api/version
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/version
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/version")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
post -api-jobs--id-run
{{baseUrl}}/api/jobs/:id/run
QUERY PARAMS
id
background
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/jobs/:id/run");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/jobs/:id/run")
require "http/client"
url = "{{baseUrl}}/api/jobs/:id/run"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/api/jobs/:id/run"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/jobs/:id/run");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/jobs/:id/run"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/api/jobs/:id/run HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/jobs/:id/run")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/jobs/:id/run"))
.method("POST", 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}}/api/jobs/:id/run")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/jobs/:id/run")
.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('POST', '{{baseUrl}}/api/jobs/:id/run');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/api/jobs/:id/run'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/jobs/:id/run';
const options = {method: 'POST'};
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}}/api/jobs/:id/run',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/jobs/:id/run")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/jobs/:id/run',
headers: {}
};
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: 'POST', url: '{{baseUrl}}/api/jobs/:id/run'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/api/jobs/:id/run');
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}}/api/jobs/:id/run'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/jobs/:id/run';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/jobs/:id/run"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/jobs/:id/run" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/jobs/:id/run",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/jobs/:id/run');
echo $response->getBody();
setUrl('{{baseUrl}}/api/jobs/:id/run');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/jobs/:id/run');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/jobs/:id/run' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/jobs/:id/run' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/api/jobs/:id/run")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/jobs/:id/run"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/jobs/:id/run"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/jobs/:id/run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/api/jobs/:id/run') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/jobs/:id/run";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/api/jobs/:id/run
http POST {{baseUrl}}/api/jobs/:id/run
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/api/jobs/:id/run
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/jobs/:id/run")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
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
post -api-system-fixers--fixerId-run
{{baseUrl}}/api/system/fixers/:fixerId/run
QUERY PARAMS
fixerId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/system/fixers/:fixerId/run");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/system/fixers/:fixerId/run")
require "http/client"
url = "{{baseUrl}}/api/system/fixers/:fixerId/run"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/api/system/fixers/:fixerId/run"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/system/fixers/:fixerId/run");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/system/fixers/:fixerId/run"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/api/system/fixers/:fixerId/run HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/system/fixers/:fixerId/run")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/system/fixers/:fixerId/run"))
.method("POST", 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}}/api/system/fixers/:fixerId/run")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/system/fixers/:fixerId/run")
.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('POST', '{{baseUrl}}/api/system/fixers/:fixerId/run');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/system/fixers/:fixerId/run'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/system/fixers/:fixerId/run';
const options = {method: 'POST'};
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}}/api/system/fixers/:fixerId/run',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/system/fixers/:fixerId/run")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/system/fixers/:fixerId/run',
headers: {}
};
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: 'POST',
url: '{{baseUrl}}/api/system/fixers/:fixerId/run'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/api/system/fixers/:fixerId/run');
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}}/api/system/fixers/:fixerId/run'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/system/fixers/:fixerId/run';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/system/fixers/:fixerId/run"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/system/fixers/:fixerId/run" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/system/fixers/:fixerId/run",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/system/fixers/:fixerId/run');
echo $response->getBody();
setUrl('{{baseUrl}}/api/system/fixers/:fixerId/run');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/system/fixers/:fixerId/run');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/system/fixers/:fixerId/run' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/system/fixers/:fixerId/run' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/api/system/fixers/:fixerId/run")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/system/fixers/:fixerId/run"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/system/fixers/:fixerId/run"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/system/fixers/:fixerId/run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/api/system/fixers/:fixerId/run') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/system/fixers/:fixerId/run";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/api/system/fixers/:fixerId/run
http POST {{baseUrl}}/api/system/fixers/:fixerId/run
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/api/system/fixers/:fixerId/run
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/system/fixers/:fixerId/run")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
PUT
put -api-system-settings-backup
{{baseUrl}}/api/system/settings/backup
BODY json
{
"configurations": [
{
"enabled": false,
"schedule": "",
"outputs": []
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/system/settings/backup");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/api/system/settings/backup" {:content-type :json
:form-params {:configurations [{:enabled false
:schedule ""
:outputs []}]}})
require "http/client"
url = "{{baseUrl}}/api/system/settings/backup"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/api/system/settings/backup"),
Content = new StringContent("{\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\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}}/api/system/settings/backup");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/system/settings/backup"
payload := strings.NewReader("{\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
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))
}
PUT /baseUrl/api/system/settings/backup HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 107
{
"configurations": [
{
"enabled": false,
"schedule": "",
"outputs": []
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/api/system/settings/backup")
.setHeader("content-type", "application/json")
.setBody("{\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/system/settings/backup"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\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 \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/system/settings/backup")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/api/system/settings/backup")
.header("content-type", "application/json")
.body("{\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n}")
.asString();
const data = JSON.stringify({
configurations: [
{
enabled: false,
schedule: '',
outputs: []
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/api/system/settings/backup');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/system/settings/backup',
headers: {'content-type': 'application/json'},
data: {configurations: [{enabled: false, schedule: '', outputs: []}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/system/settings/backup';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"configurations":[{"enabled":false,"schedule":"","outputs":[]}]}'
};
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}}/api/system/settings/backup',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "configurations": [\n {\n "enabled": false,\n "schedule": "",\n "outputs": []\n }\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 \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/system/settings/backup")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/system/settings/backup',
headers: {
'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({configurations: [{enabled: false, schedule: '', outputs: []}]}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/system/settings/backup',
headers: {'content-type': 'application/json'},
body: {configurations: [{enabled: false, schedule: '', outputs: []}]},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/api/system/settings/backup');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
configurations: [
{
enabled: false,
schedule: '',
outputs: []
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/system/settings/backup',
headers: {'content-type': 'application/json'},
data: {configurations: [{enabled: false, schedule: '', outputs: []}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/system/settings/backup';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"configurations":[{"enabled":false,"schedule":"","outputs":[]}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"configurations": @[ @{ @"enabled": @NO, @"schedule": @"", @"outputs": @[ ] } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/system/settings/backup"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[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}}/api/system/settings/backup" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/system/settings/backup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'configurations' => [
[
'enabled' => null,
'schedule' => '',
'outputs' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/api/system/settings/backup', [
'body' => '{
"configurations": [
{
"enabled": false,
"schedule": "",
"outputs": []
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/system/settings/backup');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'configurations' => [
[
'enabled' => null,
'schedule' => '',
'outputs' => [
]
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'configurations' => [
[
'enabled' => null,
'schedule' => '',
'outputs' => [
]
]
]
]));
$request->setRequestUrl('{{baseUrl}}/api/system/settings/backup');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/system/settings/backup' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"configurations": [
{
"enabled": false,
"schedule": "",
"outputs": []
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/system/settings/backup' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"configurations": [
{
"enabled": false,
"schedule": "",
"outputs": []
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/api/system/settings/backup", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/system/settings/backup"
payload = { "configurations": [
{
"enabled": False,
"schedule": "",
"outputs": []
}
] }
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/system/settings/backup"
payload <- "{\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/system/settings/backup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\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.put('/baseUrl/api/system/settings/backup') do |req|
req.body = "{\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/system/settings/backup";
let payload = json!({"configurations": (
json!({
"enabled": false,
"schedule": "",
"outputs": ()
})
)});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/api/system/settings/backup \
--header 'content-type: application/json' \
--data '{
"configurations": [
{
"enabled": false,
"schedule": "",
"outputs": []
}
]
}'
echo '{
"configurations": [
{
"enabled": false,
"schedule": "",
"outputs": []
}
]
}' | \
http PUT {{baseUrl}}/api/system/settings/backup \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "configurations": [\n {\n "enabled": false,\n "schedule": "",\n "outputs": []\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/api/system/settings/backup
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["configurations": [
[
"enabled": false,
"schedule": "",
"outputs": []
]
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/system/settings/backup")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
PUT
put -api-system-settings
{{baseUrl}}/api/system/settings
BODY json
{
"logging": {
"logLevel": "",
"useEnvVarLevel": false
},
"backup": {
"configurations": [
{
"enabled": false,
"schedule": "",
"outputs": []
}
]
},
"cache": {
"enablePlexRequestCache": false
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/system/settings");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"logging\": {\n \"logLevel\": \"\",\n \"useEnvVarLevel\": false\n },\n \"backup\": {\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n },\n \"cache\": {\n \"enablePlexRequestCache\": false\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/api/system/settings" {:content-type :json
:form-params {:logging {:logLevel ""
:useEnvVarLevel false}
:backup {:configurations [{:enabled false
:schedule ""
:outputs []}]}
:cache {:enablePlexRequestCache false}}})
require "http/client"
url = "{{baseUrl}}/api/system/settings"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"logging\": {\n \"logLevel\": \"\",\n \"useEnvVarLevel\": false\n },\n \"backup\": {\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n },\n \"cache\": {\n \"enablePlexRequestCache\": false\n }\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/api/system/settings"),
Content = new StringContent("{\n \"logging\": {\n \"logLevel\": \"\",\n \"useEnvVarLevel\": false\n },\n \"backup\": {\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n },\n \"cache\": {\n \"enablePlexRequestCache\": false\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}}/api/system/settings");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"logging\": {\n \"logLevel\": \"\",\n \"useEnvVarLevel\": false\n },\n \"backup\": {\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n },\n \"cache\": {\n \"enablePlexRequestCache\": false\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/system/settings"
payload := strings.NewReader("{\n \"logging\": {\n \"logLevel\": \"\",\n \"useEnvVarLevel\": false\n },\n \"backup\": {\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n },\n \"cache\": {\n \"enablePlexRequestCache\": false\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
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))
}
PUT /baseUrl/api/system/settings HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 261
{
"logging": {
"logLevel": "",
"useEnvVarLevel": false
},
"backup": {
"configurations": [
{
"enabled": false,
"schedule": "",
"outputs": []
}
]
},
"cache": {
"enablePlexRequestCache": false
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/api/system/settings")
.setHeader("content-type", "application/json")
.setBody("{\n \"logging\": {\n \"logLevel\": \"\",\n \"useEnvVarLevel\": false\n },\n \"backup\": {\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n },\n \"cache\": {\n \"enablePlexRequestCache\": false\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/system/settings"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"logging\": {\n \"logLevel\": \"\",\n \"useEnvVarLevel\": false\n },\n \"backup\": {\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n },\n \"cache\": {\n \"enablePlexRequestCache\": false\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 \"logging\": {\n \"logLevel\": \"\",\n \"useEnvVarLevel\": false\n },\n \"backup\": {\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n },\n \"cache\": {\n \"enablePlexRequestCache\": false\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/system/settings")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/api/system/settings")
.header("content-type", "application/json")
.body("{\n \"logging\": {\n \"logLevel\": \"\",\n \"useEnvVarLevel\": false\n },\n \"backup\": {\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n },\n \"cache\": {\n \"enablePlexRequestCache\": false\n }\n}")
.asString();
const data = JSON.stringify({
logging: {
logLevel: '',
useEnvVarLevel: false
},
backup: {
configurations: [
{
enabled: false,
schedule: '',
outputs: []
}
]
},
cache: {
enablePlexRequestCache: false
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/api/system/settings');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/system/settings',
headers: {'content-type': 'application/json'},
data: {
logging: {logLevel: '', useEnvVarLevel: false},
backup: {configurations: [{enabled: false, schedule: '', outputs: []}]},
cache: {enablePlexRequestCache: false}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/system/settings';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"logging":{"logLevel":"","useEnvVarLevel":false},"backup":{"configurations":[{"enabled":false,"schedule":"","outputs":[]}]},"cache":{"enablePlexRequestCache":false}}'
};
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}}/api/system/settings',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "logging": {\n "logLevel": "",\n "useEnvVarLevel": false\n },\n "backup": {\n "configurations": [\n {\n "enabled": false,\n "schedule": "",\n "outputs": []\n }\n ]\n },\n "cache": {\n "enablePlexRequestCache": false\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 \"logging\": {\n \"logLevel\": \"\",\n \"useEnvVarLevel\": false\n },\n \"backup\": {\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n },\n \"cache\": {\n \"enablePlexRequestCache\": false\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/system/settings")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/system/settings',
headers: {
'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({
logging: {logLevel: '', useEnvVarLevel: false},
backup: {configurations: [{enabled: false, schedule: '', outputs: []}]},
cache: {enablePlexRequestCache: false}
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/system/settings',
headers: {'content-type': 'application/json'},
body: {
logging: {logLevel: '', useEnvVarLevel: false},
backup: {configurations: [{enabled: false, schedule: '', outputs: []}]},
cache: {enablePlexRequestCache: false}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/api/system/settings');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
logging: {
logLevel: '',
useEnvVarLevel: false
},
backup: {
configurations: [
{
enabled: false,
schedule: '',
outputs: []
}
]
},
cache: {
enablePlexRequestCache: false
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/system/settings',
headers: {'content-type': 'application/json'},
data: {
logging: {logLevel: '', useEnvVarLevel: false},
backup: {configurations: [{enabled: false, schedule: '', outputs: []}]},
cache: {enablePlexRequestCache: false}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/system/settings';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"logging":{"logLevel":"","useEnvVarLevel":false},"backup":{"configurations":[{"enabled":false,"schedule":"","outputs":[]}]},"cache":{"enablePlexRequestCache":false}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"logging": @{ @"logLevel": @"", @"useEnvVarLevel": @NO },
@"backup": @{ @"configurations": @[ @{ @"enabled": @NO, @"schedule": @"", @"outputs": @[ ] } ] },
@"cache": @{ @"enablePlexRequestCache": @NO } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/system/settings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[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}}/api/system/settings" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"logging\": {\n \"logLevel\": \"\",\n \"useEnvVarLevel\": false\n },\n \"backup\": {\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n },\n \"cache\": {\n \"enablePlexRequestCache\": false\n }\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/system/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'logging' => [
'logLevel' => '',
'useEnvVarLevel' => null
],
'backup' => [
'configurations' => [
[
'enabled' => null,
'schedule' => '',
'outputs' => [
]
]
]
],
'cache' => [
'enablePlexRequestCache' => null
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/api/system/settings', [
'body' => '{
"logging": {
"logLevel": "",
"useEnvVarLevel": false
},
"backup": {
"configurations": [
{
"enabled": false,
"schedule": "",
"outputs": []
}
]
},
"cache": {
"enablePlexRequestCache": false
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/system/settings');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'logging' => [
'logLevel' => '',
'useEnvVarLevel' => null
],
'backup' => [
'configurations' => [
[
'enabled' => null,
'schedule' => '',
'outputs' => [
]
]
]
],
'cache' => [
'enablePlexRequestCache' => null
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'logging' => [
'logLevel' => '',
'useEnvVarLevel' => null
],
'backup' => [
'configurations' => [
[
'enabled' => null,
'schedule' => '',
'outputs' => [
]
]
]
],
'cache' => [
'enablePlexRequestCache' => null
]
]));
$request->setRequestUrl('{{baseUrl}}/api/system/settings');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/system/settings' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"logging": {
"logLevel": "",
"useEnvVarLevel": false
},
"backup": {
"configurations": [
{
"enabled": false,
"schedule": "",
"outputs": []
}
]
},
"cache": {
"enablePlexRequestCache": false
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/system/settings' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"logging": {
"logLevel": "",
"useEnvVarLevel": false
},
"backup": {
"configurations": [
{
"enabled": false,
"schedule": "",
"outputs": []
}
]
},
"cache": {
"enablePlexRequestCache": false
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"logging\": {\n \"logLevel\": \"\",\n \"useEnvVarLevel\": false\n },\n \"backup\": {\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n },\n \"cache\": {\n \"enablePlexRequestCache\": false\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/api/system/settings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/system/settings"
payload = {
"logging": {
"logLevel": "",
"useEnvVarLevel": False
},
"backup": { "configurations": [
{
"enabled": False,
"schedule": "",
"outputs": []
}
] },
"cache": { "enablePlexRequestCache": False }
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/system/settings"
payload <- "{\n \"logging\": {\n \"logLevel\": \"\",\n \"useEnvVarLevel\": false\n },\n \"backup\": {\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n },\n \"cache\": {\n \"enablePlexRequestCache\": false\n }\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/system/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"logging\": {\n \"logLevel\": \"\",\n \"useEnvVarLevel\": false\n },\n \"backup\": {\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n },\n \"cache\": {\n \"enablePlexRequestCache\": false\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.put('/baseUrl/api/system/settings') do |req|
req.body = "{\n \"logging\": {\n \"logLevel\": \"\",\n \"useEnvVarLevel\": false\n },\n \"backup\": {\n \"configurations\": [\n {\n \"enabled\": false,\n \"schedule\": \"\",\n \"outputs\": []\n }\n ]\n },\n \"cache\": {\n \"enablePlexRequestCache\": false\n }\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/system/settings";
let payload = json!({
"logging": json!({
"logLevel": "",
"useEnvVarLevel": false
}),
"backup": json!({"configurations": (
json!({
"enabled": false,
"schedule": "",
"outputs": ()
})
)}),
"cache": json!({"enablePlexRequestCache": false})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/api/system/settings \
--header 'content-type: application/json' \
--data '{
"logging": {
"logLevel": "",
"useEnvVarLevel": false
},
"backup": {
"configurations": [
{
"enabled": false,
"schedule": "",
"outputs": []
}
]
},
"cache": {
"enablePlexRequestCache": false
}
}'
echo '{
"logging": {
"logLevel": "",
"useEnvVarLevel": false
},
"backup": {
"configurations": [
{
"enabled": false,
"schedule": "",
"outputs": []
}
]
},
"cache": {
"enablePlexRequestCache": false
}
}' | \
http PUT {{baseUrl}}/api/system/settings \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "logging": {\n "logLevel": "",\n "useEnvVarLevel": false\n },\n "backup": {\n "configurations": [\n {\n "enabled": false,\n "schedule": "",\n "outputs": []\n }\n ]\n },\n "cache": {\n "enablePlexRequestCache": false\n }\n}' \
--output-document \
- {{baseUrl}}/api/system/settings
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"logging": [
"logLevel": "",
"useEnvVarLevel": false
],
"backup": ["configurations": [
[
"enabled": false,
"schedule": "",
"outputs": []
]
]],
"cache": ["enablePlexRequestCache": false]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/system/settings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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
get -api-debug-streams-random
{{baseUrl}}/api/debug/streams/random
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/debug/streams/random");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/debug/streams/random")
require "http/client"
url = "{{baseUrl}}/api/debug/streams/random"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/debug/streams/random"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/debug/streams/random");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/debug/streams/random"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/debug/streams/random HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/debug/streams/random")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/debug/streams/random"))
.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}}/api/debug/streams/random")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/debug/streams/random")
.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}}/api/debug/streams/random');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/debug/streams/random'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/debug/streams/random';
const options = {method: 'GET'};
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}}/api/debug/streams/random',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/debug/streams/random")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/debug/streams/random',
headers: {}
};
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}}/api/debug/streams/random'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/debug/streams/random');
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}}/api/debug/streams/random'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/debug/streams/random';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/debug/streams/random"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/debug/streams/random" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/debug/streams/random",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/debug/streams/random');
echo $response->getBody();
setUrl('{{baseUrl}}/api/debug/streams/random');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/debug/streams/random');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/debug/streams/random' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/debug/streams/random' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/debug/streams/random")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/debug/streams/random"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/debug/streams/random"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/debug/streams/random")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/debug/streams/random') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/debug/streams/random";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/debug/streams/random
http GET {{baseUrl}}/api/debug/streams/random
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/debug/streams/random
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/debug/streams/random")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
get -api-xmltv-last-refresh
{{baseUrl}}/api/xmltv-last-refresh
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/xmltv-last-refresh");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/xmltv-last-refresh")
require "http/client"
url = "{{baseUrl}}/api/xmltv-last-refresh"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/xmltv-last-refresh"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/xmltv-last-refresh");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/xmltv-last-refresh"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/xmltv-last-refresh HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/xmltv-last-refresh")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/xmltv-last-refresh"))
.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}}/api/xmltv-last-refresh")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/xmltv-last-refresh")
.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}}/api/xmltv-last-refresh');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/xmltv-last-refresh'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/xmltv-last-refresh';
const options = {method: 'GET'};
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}}/api/xmltv-last-refresh',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/xmltv-last-refresh")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/xmltv-last-refresh',
headers: {}
};
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}}/api/xmltv-last-refresh'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/xmltv-last-refresh');
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}}/api/xmltv-last-refresh'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/xmltv-last-refresh';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/xmltv-last-refresh"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/api/xmltv-last-refresh" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/xmltv-last-refresh",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/xmltv-last-refresh');
echo $response->getBody();
setUrl('{{baseUrl}}/api/xmltv-last-refresh');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/xmltv-last-refresh');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/xmltv-last-refresh' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/xmltv-last-refresh' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/xmltv-last-refresh")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/xmltv-last-refresh"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/xmltv-last-refresh"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/xmltv-last-refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/xmltv-last-refresh') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/xmltv-last-refresh";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/xmltv-last-refresh
http GET {{baseUrl}}/api/xmltv-last-refresh
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/xmltv-last-refresh
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/xmltv-last-refresh")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
post -api-upload-image
{{baseUrl}}/api/upload/image
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/upload/image");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/upload/image")
require "http/client"
url = "{{baseUrl}}/api/upload/image"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/api/upload/image"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/upload/image");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/upload/image"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/api/upload/image HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/upload/image")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/upload/image"))
.method("POST", 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}}/api/upload/image")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/upload/image")
.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('POST', '{{baseUrl}}/api/upload/image');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/api/upload/image'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/upload/image';
const options = {method: 'POST'};
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}}/api/upload/image',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/upload/image")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/upload/image',
headers: {}
};
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: 'POST', url: '{{baseUrl}}/api/upload/image'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/api/upload/image');
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}}/api/upload/image'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/upload/image';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/upload/image"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/upload/image" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/upload/image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/upload/image');
echo $response->getBody();
setUrl('{{baseUrl}}/api/upload/image');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/upload/image');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/upload/image' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/upload/image' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/api/upload/image")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/upload/image"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/upload/image"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/upload/image")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/api/upload/image') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/upload/image";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/api/upload/image
http POST {{baseUrl}}/api/upload/image
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/api/upload/image
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/upload/image")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
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
post -api-xmltv-refresh
{{baseUrl}}/api/xmltv/refresh
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/xmltv/refresh");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/xmltv/refresh")
require "http/client"
url = "{{baseUrl}}/api/xmltv/refresh"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/api/xmltv/refresh"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/xmltv/refresh");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/xmltv/refresh"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/api/xmltv/refresh HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/xmltv/refresh")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/xmltv/refresh"))
.method("POST", 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}}/api/xmltv/refresh")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/xmltv/refresh")
.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('POST', '{{baseUrl}}/api/xmltv/refresh');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/api/xmltv/refresh'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/xmltv/refresh';
const options = {method: 'POST'};
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}}/api/xmltv/refresh',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/xmltv/refresh")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/xmltv/refresh',
headers: {}
};
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: 'POST', url: '{{baseUrl}}/api/xmltv/refresh'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/api/xmltv/refresh');
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}}/api/xmltv/refresh'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/xmltv/refresh';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/xmltv/refresh"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/xmltv/refresh" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/xmltv/refresh",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/xmltv/refresh');
echo $response->getBody();
setUrl('{{baseUrl}}/api/xmltv/refresh');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/xmltv/refresh');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/xmltv/refresh' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/xmltv/refresh' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/api/xmltv/refresh")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/xmltv/refresh"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/xmltv/refresh"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/xmltv/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/api/xmltv/refresh') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/xmltv/refresh";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/api/xmltv/refresh
http POST {{baseUrl}}/api/xmltv/refresh
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/api/xmltv/refresh
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/xmltv/refresh")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
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()