Cloud Identity-Aware Proxy API
POST
iap.projects.brands.create
{{baseUrl}}/v1/:parent/brands
QUERY PARAMS
parent
BODY json
{
"applicationTitle": "",
"name": "",
"orgInternalOnly": false,
"supportEmail": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/brands");
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 \"applicationTitle\": \"\",\n \"name\": \"\",\n \"orgInternalOnly\": false,\n \"supportEmail\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/brands" {:content-type :json
:form-params {:applicationTitle ""
:name ""
:orgInternalOnly false
:supportEmail ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/brands"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"applicationTitle\": \"\",\n \"name\": \"\",\n \"orgInternalOnly\": false,\n \"supportEmail\": \"\"\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}}/v1/:parent/brands"),
Content = new StringContent("{\n \"applicationTitle\": \"\",\n \"name\": \"\",\n \"orgInternalOnly\": false,\n \"supportEmail\": \"\"\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}}/v1/:parent/brands");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationTitle\": \"\",\n \"name\": \"\",\n \"orgInternalOnly\": false,\n \"supportEmail\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/brands"
payload := strings.NewReader("{\n \"applicationTitle\": \"\",\n \"name\": \"\",\n \"orgInternalOnly\": false,\n \"supportEmail\": \"\"\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/v1/:parent/brands HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 92
{
"applicationTitle": "",
"name": "",
"orgInternalOnly": false,
"supportEmail": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/brands")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationTitle\": \"\",\n \"name\": \"\",\n \"orgInternalOnly\": false,\n \"supportEmail\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/brands"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationTitle\": \"\",\n \"name\": \"\",\n \"orgInternalOnly\": false,\n \"supportEmail\": \"\"\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 \"applicationTitle\": \"\",\n \"name\": \"\",\n \"orgInternalOnly\": false,\n \"supportEmail\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/brands")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/brands")
.header("content-type", "application/json")
.body("{\n \"applicationTitle\": \"\",\n \"name\": \"\",\n \"orgInternalOnly\": false,\n \"supportEmail\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationTitle: '',
name: '',
orgInternalOnly: false,
supportEmail: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:parent/brands');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/brands',
headers: {'content-type': 'application/json'},
data: {applicationTitle: '', name: '', orgInternalOnly: false, supportEmail: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/brands';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"applicationTitle":"","name":"","orgInternalOnly":false,"supportEmail":""}'
};
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}}/v1/:parent/brands',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationTitle": "",\n "name": "",\n "orgInternalOnly": false,\n "supportEmail": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"applicationTitle\": \"\",\n \"name\": \"\",\n \"orgInternalOnly\": false,\n \"supportEmail\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/brands")
.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/v1/:parent/brands',
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({applicationTitle: '', name: '', orgInternalOnly: false, supportEmail: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/brands',
headers: {'content-type': 'application/json'},
body: {applicationTitle: '', name: '', orgInternalOnly: false, supportEmail: ''},
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}}/v1/:parent/brands');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationTitle: '',
name: '',
orgInternalOnly: false,
supportEmail: ''
});
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}}/v1/:parent/brands',
headers: {'content-type': 'application/json'},
data: {applicationTitle: '', name: '', orgInternalOnly: false, supportEmail: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/brands';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"applicationTitle":"","name":"","orgInternalOnly":false,"supportEmail":""}'
};
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 = @{ @"applicationTitle": @"",
@"name": @"",
@"orgInternalOnly": @NO,
@"supportEmail": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/brands"]
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}}/v1/:parent/brands" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"applicationTitle\": \"\",\n \"name\": \"\",\n \"orgInternalOnly\": false,\n \"supportEmail\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/brands",
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([
'applicationTitle' => '',
'name' => '',
'orgInternalOnly' => null,
'supportEmail' => ''
]),
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}}/v1/:parent/brands', [
'body' => '{
"applicationTitle": "",
"name": "",
"orgInternalOnly": false,
"supportEmail": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/brands');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationTitle' => '',
'name' => '',
'orgInternalOnly' => null,
'supportEmail' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationTitle' => '',
'name' => '',
'orgInternalOnly' => null,
'supportEmail' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/brands');
$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}}/v1/:parent/brands' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationTitle": "",
"name": "",
"orgInternalOnly": false,
"supportEmail": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/brands' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationTitle": "",
"name": "",
"orgInternalOnly": false,
"supportEmail": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationTitle\": \"\",\n \"name\": \"\",\n \"orgInternalOnly\": false,\n \"supportEmail\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/brands", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/brands"
payload = {
"applicationTitle": "",
"name": "",
"orgInternalOnly": False,
"supportEmail": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/brands"
payload <- "{\n \"applicationTitle\": \"\",\n \"name\": \"\",\n \"orgInternalOnly\": false,\n \"supportEmail\": \"\"\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}}/v1/:parent/brands")
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 \"applicationTitle\": \"\",\n \"name\": \"\",\n \"orgInternalOnly\": false,\n \"supportEmail\": \"\"\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/v1/:parent/brands') do |req|
req.body = "{\n \"applicationTitle\": \"\",\n \"name\": \"\",\n \"orgInternalOnly\": false,\n \"supportEmail\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/brands";
let payload = json!({
"applicationTitle": "",
"name": "",
"orgInternalOnly": false,
"supportEmail": ""
});
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}}/v1/:parent/brands \
--header 'content-type: application/json' \
--data '{
"applicationTitle": "",
"name": "",
"orgInternalOnly": false,
"supportEmail": ""
}'
echo '{
"applicationTitle": "",
"name": "",
"orgInternalOnly": false,
"supportEmail": ""
}' | \
http POST {{baseUrl}}/v1/:parent/brands \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "applicationTitle": "",\n "name": "",\n "orgInternalOnly": false,\n "supportEmail": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/brands
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"applicationTitle": "",
"name": "",
"orgInternalOnly": false,
"supportEmail": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/brands")! 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
iap.projects.brands.identityAwareProxyClients.create
{{baseUrl}}/v1/:parent/identityAwareProxyClients
QUERY PARAMS
parent
BODY json
{
"displayName": "",
"name": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/identityAwareProxyClients");
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 \"displayName\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/identityAwareProxyClients" {:content-type :json
:form-params {:displayName ""
:name ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/identityAwareProxyClients"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"displayName\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\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}}/v1/:parent/identityAwareProxyClients"),
Content = new StringContent("{\n \"displayName\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\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}}/v1/:parent/identityAwareProxyClients");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"displayName\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/identityAwareProxyClients"
payload := strings.NewReader("{\n \"displayName\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\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/v1/:parent/identityAwareProxyClients HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 53
{
"displayName": "",
"name": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/identityAwareProxyClients")
.setHeader("content-type", "application/json")
.setBody("{\n \"displayName\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/identityAwareProxyClients"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"displayName\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\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 \"displayName\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/identityAwareProxyClients")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/identityAwareProxyClients")
.header("content-type", "application/json")
.body("{\n \"displayName\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
displayName: '',
name: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:parent/identityAwareProxyClients');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/identityAwareProxyClients',
headers: {'content-type': 'application/json'},
data: {displayName: '', name: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/identityAwareProxyClients';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"displayName":"","name":"","secret":""}'
};
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}}/v1/:parent/identityAwareProxyClients',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "displayName": "",\n "name": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"displayName\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/identityAwareProxyClients")
.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/v1/:parent/identityAwareProxyClients',
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({displayName: '', name: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/identityAwareProxyClients',
headers: {'content-type': 'application/json'},
body: {displayName: '', name: '', secret: ''},
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}}/v1/:parent/identityAwareProxyClients');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
displayName: '',
name: '',
secret: ''
});
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}}/v1/:parent/identityAwareProxyClients',
headers: {'content-type': 'application/json'},
data: {displayName: '', name: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/identityAwareProxyClients';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"displayName":"","name":"","secret":""}'
};
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 = @{ @"displayName": @"",
@"name": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/identityAwareProxyClients"]
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}}/v1/:parent/identityAwareProxyClients" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"displayName\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/identityAwareProxyClients",
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([
'displayName' => '',
'name' => '',
'secret' => ''
]),
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}}/v1/:parent/identityAwareProxyClients', [
'body' => '{
"displayName": "",
"name": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/identityAwareProxyClients');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'displayName' => '',
'name' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'displayName' => '',
'name' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/identityAwareProxyClients');
$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}}/v1/:parent/identityAwareProxyClients' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"displayName": "",
"name": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/identityAwareProxyClients' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"displayName": "",
"name": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"displayName\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/identityAwareProxyClients", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/identityAwareProxyClients"
payload = {
"displayName": "",
"name": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/identityAwareProxyClients"
payload <- "{\n \"displayName\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\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}}/v1/:parent/identityAwareProxyClients")
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 \"displayName\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\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/v1/:parent/identityAwareProxyClients') do |req|
req.body = "{\n \"displayName\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/identityAwareProxyClients";
let payload = json!({
"displayName": "",
"name": "",
"secret": ""
});
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}}/v1/:parent/identityAwareProxyClients \
--header 'content-type: application/json' \
--data '{
"displayName": "",
"name": "",
"secret": ""
}'
echo '{
"displayName": "",
"name": "",
"secret": ""
}' | \
http POST {{baseUrl}}/v1/:parent/identityAwareProxyClients \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "displayName": "",\n "name": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/identityAwareProxyClients
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"displayName": "",
"name": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/identityAwareProxyClients")! 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
iap.projects.brands.identityAwareProxyClients.list
{{baseUrl}}/v1/:parent/identityAwareProxyClients
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/identityAwareProxyClients");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/identityAwareProxyClients")
require "http/client"
url = "{{baseUrl}}/v1/:parent/identityAwareProxyClients"
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}}/v1/:parent/identityAwareProxyClients"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/identityAwareProxyClients");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/identityAwareProxyClients"
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/v1/:parent/identityAwareProxyClients HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/identityAwareProxyClients")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/identityAwareProxyClients"))
.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}}/v1/:parent/identityAwareProxyClients")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/identityAwareProxyClients")
.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}}/v1/:parent/identityAwareProxyClients');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/:parent/identityAwareProxyClients'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/identityAwareProxyClients';
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}}/v1/:parent/identityAwareProxyClients',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/identityAwareProxyClients")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/identityAwareProxyClients',
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}}/v1/:parent/identityAwareProxyClients'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/identityAwareProxyClients');
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}}/v1/:parent/identityAwareProxyClients'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/identityAwareProxyClients';
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}}/v1/:parent/identityAwareProxyClients"]
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}}/v1/:parent/identityAwareProxyClients" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/identityAwareProxyClients",
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}}/v1/:parent/identityAwareProxyClients');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/identityAwareProxyClients');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/identityAwareProxyClients');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/identityAwareProxyClients' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/identityAwareProxyClients' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/identityAwareProxyClients")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/identityAwareProxyClients"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/identityAwareProxyClients"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/identityAwareProxyClients")
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/v1/:parent/identityAwareProxyClients') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/identityAwareProxyClients";
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}}/v1/:parent/identityAwareProxyClients
http GET {{baseUrl}}/v1/:parent/identityAwareProxyClients
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/identityAwareProxyClients
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/identityAwareProxyClients")! 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
iap.projects.brands.identityAwareProxyClients.resetSecret
{{baseUrl}}/v1/:name:resetSecret
QUERY PARAMS
name
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:resetSecret");
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, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:resetSecret" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v1/:name:resetSecret"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
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}}/v1/:name:resetSecret"),
Content = new StringContent("{}")
{
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}}/v1/:name:resetSecret");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:resetSecret"
payload := strings.NewReader("{}")
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/v1/:name:resetSecret HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:resetSecret")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:resetSecret"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.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, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:resetSecret")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:resetSecret")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:name:resetSecret');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:resetSecret',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:resetSecret';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
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}}/v1/:name:resetSecret',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:resetSecret")
.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/v1/:name:resetSecret',
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({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:resetSecret',
headers: {'content-type': 'application/json'},
body: {},
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}}/v1/:name:resetSecret');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
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}}/v1/:name:resetSecret',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:resetSecret';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
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 = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:resetSecret"]
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}}/v1/:name:resetSecret" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:resetSecret",
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([
]),
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}}/v1/:name:resetSecret', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:resetSecret');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:resetSecret');
$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}}/v1/:name:resetSecret' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:resetSecret' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:name:resetSecret", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:resetSecret"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:resetSecret"
payload <- "{}"
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}}/v1/:name:resetSecret")
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 = "{}"
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/v1/:name:resetSecret') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:resetSecret";
let payload = json!({});
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}}/v1/:name:resetSecret \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v1/:name:resetSecret \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v1/:name:resetSecret
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:resetSecret")! 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
iap.projects.brands.list
{{baseUrl}}/v1/:parent/brands
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/brands");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/brands")
require "http/client"
url = "{{baseUrl}}/v1/:parent/brands"
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}}/v1/:parent/brands"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/brands");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/brands"
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/v1/:parent/brands HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/brands")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/brands"))
.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}}/v1/:parent/brands")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/brands")
.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}}/v1/:parent/brands');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/brands'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/brands';
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}}/v1/:parent/brands',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/brands")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/brands',
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}}/v1/:parent/brands'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/brands');
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}}/v1/:parent/brands'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/brands';
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}}/v1/:parent/brands"]
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}}/v1/:parent/brands" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/brands",
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}}/v1/:parent/brands');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/brands');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/brands');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/brands' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/brands' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/brands")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/brands"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/brands"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/brands")
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/v1/:parent/brands') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/brands";
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}}/v1/:parent/brands
http GET {{baseUrl}}/v1/:parent/brands
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/brands
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/brands")! 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
iap.projects.iap_tunnel.locations.destGroups.create
{{baseUrl}}/v1/:parent/destGroups
QUERY PARAMS
parent
BODY json
{
"cidrs": [],
"fqdns": [],
"name": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/destGroups");
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 \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/destGroups" {:content-type :json
:form-params {:cidrs []
:fqdns []
:name ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/destGroups"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\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}}/v1/:parent/destGroups"),
Content = new StringContent("{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\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}}/v1/:parent/destGroups");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/destGroups"
payload := strings.NewReader("{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\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/v1/:parent/destGroups HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 46
{
"cidrs": [],
"fqdns": [],
"name": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/destGroups")
.setHeader("content-type", "application/json")
.setBody("{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/destGroups"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\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 \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/destGroups")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/destGroups")
.header("content-type", "application/json")
.body("{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\n}")
.asString();
const data = JSON.stringify({
cidrs: [],
fqdns: [],
name: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:parent/destGroups');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/destGroups',
headers: {'content-type': 'application/json'},
data: {cidrs: [], fqdns: [], name: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/destGroups';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"cidrs":[],"fqdns":[],"name":""}'
};
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}}/v1/:parent/destGroups',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "cidrs": [],\n "fqdns": [],\n "name": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/destGroups")
.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/v1/:parent/destGroups',
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({cidrs: [], fqdns: [], name: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/destGroups',
headers: {'content-type': 'application/json'},
body: {cidrs: [], fqdns: [], name: ''},
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}}/v1/:parent/destGroups');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
cidrs: [],
fqdns: [],
name: ''
});
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}}/v1/:parent/destGroups',
headers: {'content-type': 'application/json'},
data: {cidrs: [], fqdns: [], name: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/destGroups';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"cidrs":[],"fqdns":[],"name":""}'
};
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 = @{ @"cidrs": @[ ],
@"fqdns": @[ ],
@"name": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/destGroups"]
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}}/v1/:parent/destGroups" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/destGroups",
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([
'cidrs' => [
],
'fqdns' => [
],
'name' => ''
]),
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}}/v1/:parent/destGroups', [
'body' => '{
"cidrs": [],
"fqdns": [],
"name": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/destGroups');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'cidrs' => [
],
'fqdns' => [
],
'name' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'cidrs' => [
],
'fqdns' => [
],
'name' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/destGroups');
$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}}/v1/:parent/destGroups' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"cidrs": [],
"fqdns": [],
"name": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/destGroups' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"cidrs": [],
"fqdns": [],
"name": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/destGroups", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/destGroups"
payload = {
"cidrs": [],
"fqdns": [],
"name": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/destGroups"
payload <- "{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\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}}/v1/:parent/destGroups")
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 \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\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/v1/:parent/destGroups') do |req|
req.body = "{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/destGroups";
let payload = json!({
"cidrs": (),
"fqdns": (),
"name": ""
});
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}}/v1/:parent/destGroups \
--header 'content-type: application/json' \
--data '{
"cidrs": [],
"fqdns": [],
"name": ""
}'
echo '{
"cidrs": [],
"fqdns": [],
"name": ""
}' | \
http POST {{baseUrl}}/v1/:parent/destGroups \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "cidrs": [],\n "fqdns": [],\n "name": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/destGroups
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"cidrs": [],
"fqdns": [],
"name": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/destGroups")! 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
iap.projects.iap_tunnel.locations.destGroups.delete
{{baseUrl}}/v1/:name
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/:name")
require "http/client"
url = "{{baseUrl}}/v1/:name"
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}}/v1/:name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name"
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/v1/:name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/:name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name"))
.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}}/v1/:name")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/:name")
.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}}/v1/:name');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name';
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}}/v1/:name',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name',
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}}/v1/:name'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/:name');
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}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name';
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}}/v1/:name"]
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}}/v1/:name" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name",
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}}/v1/:name');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/:name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name")
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/v1/:name') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name";
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}}/v1/:name
http DELETE {{baseUrl}}/v1/:name
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/:name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name")! 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
iap.projects.iap_tunnel.locations.destGroups.get
{{baseUrl}}/v1/:name
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:name")
require "http/client"
url = "{{baseUrl}}/v1/:name"
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}}/v1/:name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name"
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/v1/:name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name"))
.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}}/v1/:name")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:name")
.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}}/v1/:name');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name';
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}}/v1/:name',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name',
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}}/v1/:name'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:name');
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}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name';
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}}/v1/:name"]
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}}/v1/:name" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name",
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}}/v1/:name');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name")
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/v1/:name') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name";
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}}/v1/:name
http GET {{baseUrl}}/v1/:name
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name")! 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
iap.projects.iap_tunnel.locations.destGroups.list
{{baseUrl}}/v1/:parent/destGroups
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/destGroups");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/destGroups")
require "http/client"
url = "{{baseUrl}}/v1/:parent/destGroups"
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}}/v1/:parent/destGroups"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/destGroups");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/destGroups"
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/v1/:parent/destGroups HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/destGroups")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/destGroups"))
.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}}/v1/:parent/destGroups")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/destGroups")
.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}}/v1/:parent/destGroups');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/destGroups'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/destGroups';
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}}/v1/:parent/destGroups',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/destGroups")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/destGroups',
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}}/v1/:parent/destGroups'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/destGroups');
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}}/v1/:parent/destGroups'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/destGroups';
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}}/v1/:parent/destGroups"]
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}}/v1/:parent/destGroups" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/destGroups",
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}}/v1/:parent/destGroups');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/destGroups');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/destGroups');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/destGroups' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/destGroups' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/destGroups")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/destGroups"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/destGroups"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/destGroups")
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/v1/:parent/destGroups') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/destGroups";
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}}/v1/:parent/destGroups
http GET {{baseUrl}}/v1/:parent/destGroups
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/destGroups
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/destGroups")! 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()
PATCH
iap.projects.iap_tunnel.locations.destGroups.patch
{{baseUrl}}/v1/:name
QUERY PARAMS
name
BODY json
{
"cidrs": [],
"fqdns": [],
"name": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name");
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 \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/v1/:name" {:content-type :json
:form-params {:cidrs []
:fqdns []
:name ""}})
require "http/client"
url = "{{baseUrl}}/v1/:name"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/v1/:name"),
Content = new StringContent("{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\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}}/v1/:name");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name"
payload := strings.NewReader("{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\n}")
req, _ := http.NewRequest("PATCH", 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))
}
PATCH /baseUrl/v1/:name HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 46
{
"cidrs": [],
"fqdns": [],
"name": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/v1/:name")
.setHeader("content-type", "application/json")
.setBody("{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\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 \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/v1/:name")
.header("content-type", "application/json")
.body("{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\n}")
.asString();
const data = JSON.stringify({
cidrs: [],
fqdns: [],
name: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/v1/:name');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1/:name',
headers: {'content-type': 'application/json'},
data: {cidrs: [], fqdns: [], name: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"cidrs":[],"fqdns":[],"name":""}'
};
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}}/v1/:name',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "cidrs": [],\n "fqdns": [],\n "name": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name',
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({cidrs: [], fqdns: [], name: ''}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1/:name',
headers: {'content-type': 'application/json'},
body: {cidrs: [], fqdns: [], name: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/v1/:name');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
cidrs: [],
fqdns: [],
name: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1/:name',
headers: {'content-type': 'application/json'},
data: {cidrs: [], fqdns: [], name: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"cidrs":[],"fqdns":[],"name":""}'
};
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 = @{ @"cidrs": @[ ],
@"fqdns": @[ ],
@"name": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[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}}/v1/:name" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'cidrs' => [
],
'fqdns' => [
],
'name' => ''
]),
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('PATCH', '{{baseUrl}}/v1/:name', [
'body' => '{
"cidrs": [],
"fqdns": [],
"name": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'cidrs' => [
],
'fqdns' => [
],
'name' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'cidrs' => [
],
'fqdns' => [
],
'name' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('PATCH');
$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}}/v1/:name' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"cidrs": [],
"fqdns": [],
"name": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"cidrs": [],
"fqdns": [],
"name": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/v1/:name", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name"
payload = {
"cidrs": [],
"fqdns": [],
"name": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name"
payload <- "{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\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.patch('/baseUrl/v1/:name') do |req|
req.body = "{\n \"cidrs\": [],\n \"fqdns\": [],\n \"name\": \"\"\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}}/v1/:name";
let payload = json!({
"cidrs": (),
"fqdns": (),
"name": ""
});
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("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/v1/:name \
--header 'content-type: application/json' \
--data '{
"cidrs": [],
"fqdns": [],
"name": ""
}'
echo '{
"cidrs": [],
"fqdns": [],
"name": ""
}' | \
http PATCH {{baseUrl}}/v1/:name \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "cidrs": [],\n "fqdns": [],\n "name": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:name
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"cidrs": [],
"fqdns": [],
"name": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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
iap.getIamPolicy
{{baseUrl}}/v1/:resource:getIamPolicy
QUERY PARAMS
resource
BODY json
{
"options": {
"requestedPolicyVersion": 0
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:resource:getIamPolicy");
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 \"options\": {\n \"requestedPolicyVersion\": 0\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:resource:getIamPolicy" {:content-type :json
:form-params {:options {:requestedPolicyVersion 0}}})
require "http/client"
url = "{{baseUrl}}/v1/:resource:getIamPolicy"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"options\": {\n \"requestedPolicyVersion\": 0\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:resource:getIamPolicy"),
Content = new StringContent("{\n \"options\": {\n \"requestedPolicyVersion\": 0\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}}/v1/:resource:getIamPolicy");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"options\": {\n \"requestedPolicyVersion\": 0\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:resource:getIamPolicy"
payload := strings.NewReader("{\n \"options\": {\n \"requestedPolicyVersion\": 0\n }\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/v1/:resource:getIamPolicy HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 54
{
"options": {
"requestedPolicyVersion": 0
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:resource:getIamPolicy")
.setHeader("content-type", "application/json")
.setBody("{\n \"options\": {\n \"requestedPolicyVersion\": 0\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:resource:getIamPolicy"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"options\": {\n \"requestedPolicyVersion\": 0\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 \"options\": {\n \"requestedPolicyVersion\": 0\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:resource:getIamPolicy")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:resource:getIamPolicy")
.header("content-type", "application/json")
.body("{\n \"options\": {\n \"requestedPolicyVersion\": 0\n }\n}")
.asString();
const data = JSON.stringify({
options: {
requestedPolicyVersion: 0
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:resource:getIamPolicy');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:resource:getIamPolicy',
headers: {'content-type': 'application/json'},
data: {options: {requestedPolicyVersion: 0}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:resource:getIamPolicy';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"options":{"requestedPolicyVersion":0}}'
};
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}}/v1/:resource:getIamPolicy',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "options": {\n "requestedPolicyVersion": 0\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 \"options\": {\n \"requestedPolicyVersion\": 0\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:resource:getIamPolicy")
.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/v1/:resource:getIamPolicy',
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({options: {requestedPolicyVersion: 0}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:resource:getIamPolicy',
headers: {'content-type': 'application/json'},
body: {options: {requestedPolicyVersion: 0}},
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}}/v1/:resource:getIamPolicy');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
options: {
requestedPolicyVersion: 0
}
});
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}}/v1/:resource:getIamPolicy',
headers: {'content-type': 'application/json'},
data: {options: {requestedPolicyVersion: 0}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:resource:getIamPolicy';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"options":{"requestedPolicyVersion":0}}'
};
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 = @{ @"options": @{ @"requestedPolicyVersion": @0 } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:resource:getIamPolicy"]
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}}/v1/:resource:getIamPolicy" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"options\": {\n \"requestedPolicyVersion\": 0\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:resource:getIamPolicy",
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([
'options' => [
'requestedPolicyVersion' => 0
]
]),
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}}/v1/:resource:getIamPolicy', [
'body' => '{
"options": {
"requestedPolicyVersion": 0
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:resource:getIamPolicy');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'options' => [
'requestedPolicyVersion' => 0
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'options' => [
'requestedPolicyVersion' => 0
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/:resource:getIamPolicy');
$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}}/v1/:resource:getIamPolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"options": {
"requestedPolicyVersion": 0
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:resource:getIamPolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"options": {
"requestedPolicyVersion": 0
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"options\": {\n \"requestedPolicyVersion\": 0\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:resource:getIamPolicy", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:resource:getIamPolicy"
payload = { "options": { "requestedPolicyVersion": 0 } }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:resource:getIamPolicy"
payload <- "{\n \"options\": {\n \"requestedPolicyVersion\": 0\n }\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}}/v1/:resource:getIamPolicy")
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 \"options\": {\n \"requestedPolicyVersion\": 0\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:resource:getIamPolicy') do |req|
req.body = "{\n \"options\": {\n \"requestedPolicyVersion\": 0\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:resource:getIamPolicy";
let payload = json!({"options": json!({"requestedPolicyVersion": 0})});
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}}/v1/:resource:getIamPolicy \
--header 'content-type: application/json' \
--data '{
"options": {
"requestedPolicyVersion": 0
}
}'
echo '{
"options": {
"requestedPolicyVersion": 0
}
}' | \
http POST {{baseUrl}}/v1/:resource:getIamPolicy \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "options": {\n "requestedPolicyVersion": 0\n }\n}' \
--output-document \
- {{baseUrl}}/v1/:resource:getIamPolicy
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["options": ["requestedPolicyVersion": 0]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:resource:getIamPolicy")! 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
iap.getIapSettings
{{baseUrl}}/v1/:name:iapSettings
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:iapSettings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:name:iapSettings")
require "http/client"
url = "{{baseUrl}}/v1/:name:iapSettings"
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}}/v1/:name:iapSettings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name:iapSettings");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:iapSettings"
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/v1/:name:iapSettings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:name:iapSettings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:iapSettings"))
.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}}/v1/:name:iapSettings")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:name:iapSettings")
.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}}/v1/:name:iapSettings');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name:iapSettings'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:iapSettings';
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}}/v1/:name:iapSettings',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:iapSettings")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name:iapSettings',
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}}/v1/:name:iapSettings'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:name:iapSettings');
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}}/v1/:name:iapSettings'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:iapSettings';
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}}/v1/:name:iapSettings"]
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}}/v1/:name:iapSettings" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:iapSettings",
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}}/v1/:name:iapSettings');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:iapSettings');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:name:iapSettings');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:iapSettings' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:iapSettings' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:name:iapSettings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:iapSettings"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:iapSettings"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:iapSettings")
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/v1/:name:iapSettings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:iapSettings";
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}}/v1/:name:iapSettings
http GET {{baseUrl}}/v1/:name:iapSettings
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:name:iapSettings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:iapSettings")! 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
iap.setIamPolicy
{{baseUrl}}/v1/:resource:setIamPolicy
QUERY PARAMS
resource
BODY json
{
"policy": {
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:resource:setIamPolicy");
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 \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:resource:setIamPolicy" {:content-type :json
:form-params {:policy {:bindings [{:condition {:description ""
:expression ""
:location ""
:title ""}
:members []
:role ""}]
:etag ""
:version 0}}})
require "http/client"
url = "{{baseUrl}}/v1/:resource:setIamPolicy"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:resource:setIamPolicy"),
Content = new StringContent("{\n \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\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}}/v1/:resource:setIamPolicy");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:resource:setIamPolicy"
payload := strings.NewReader("{\n \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\n }\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/v1/:resource:setIamPolicy HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 276
{
"policy": {
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:resource:setIamPolicy")
.setHeader("content-type", "application/json")
.setBody("{\n \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:resource:setIamPolicy"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\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 \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:resource:setIamPolicy")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:resource:setIamPolicy")
.header("content-type", "application/json")
.body("{\n \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\n }\n}")
.asString();
const data = JSON.stringify({
policy: {
bindings: [
{
condition: {
description: '',
expression: '',
location: '',
title: ''
},
members: [],
role: ''
}
],
etag: '',
version: 0
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:resource:setIamPolicy');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:resource:setIamPolicy',
headers: {'content-type': 'application/json'},
data: {
policy: {
bindings: [
{
condition: {description: '', expression: '', location: '', title: ''},
members: [],
role: ''
}
],
etag: '',
version: 0
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:resource:setIamPolicy';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"policy":{"bindings":[{"condition":{"description":"","expression":"","location":"","title":""},"members":[],"role":""}],"etag":"","version":0}}'
};
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}}/v1/:resource:setIamPolicy',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "policy": {\n "bindings": [\n {\n "condition": {\n "description": "",\n "expression": "",\n "location": "",\n "title": ""\n },\n "members": [],\n "role": ""\n }\n ],\n "etag": "",\n "version": 0\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 \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:resource:setIamPolicy")
.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/v1/:resource:setIamPolicy',
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({
policy: {
bindings: [
{
condition: {description: '', expression: '', location: '', title: ''},
members: [],
role: ''
}
],
etag: '',
version: 0
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:resource:setIamPolicy',
headers: {'content-type': 'application/json'},
body: {
policy: {
bindings: [
{
condition: {description: '', expression: '', location: '', title: ''},
members: [],
role: ''
}
],
etag: '',
version: 0
}
},
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}}/v1/:resource:setIamPolicy');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
policy: {
bindings: [
{
condition: {
description: '',
expression: '',
location: '',
title: ''
},
members: [],
role: ''
}
],
etag: '',
version: 0
}
});
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}}/v1/:resource:setIamPolicy',
headers: {'content-type': 'application/json'},
data: {
policy: {
bindings: [
{
condition: {description: '', expression: '', location: '', title: ''},
members: [],
role: ''
}
],
etag: '',
version: 0
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:resource:setIamPolicy';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"policy":{"bindings":[{"condition":{"description":"","expression":"","location":"","title":""},"members":[],"role":""}],"etag":"","version":0}}'
};
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 = @{ @"policy": @{ @"bindings": @[ @{ @"condition": @{ @"description": @"", @"expression": @"", @"location": @"", @"title": @"" }, @"members": @[ ], @"role": @"" } ], @"etag": @"", @"version": @0 } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:resource:setIamPolicy"]
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}}/v1/:resource:setIamPolicy" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:resource:setIamPolicy",
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([
'policy' => [
'bindings' => [
[
'condition' => [
'description' => '',
'expression' => '',
'location' => '',
'title' => ''
],
'members' => [
],
'role' => ''
]
],
'etag' => '',
'version' => 0
]
]),
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}}/v1/:resource:setIamPolicy', [
'body' => '{
"policy": {
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:resource:setIamPolicy');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'policy' => [
'bindings' => [
[
'condition' => [
'description' => '',
'expression' => '',
'location' => '',
'title' => ''
],
'members' => [
],
'role' => ''
]
],
'etag' => '',
'version' => 0
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'policy' => [
'bindings' => [
[
'condition' => [
'description' => '',
'expression' => '',
'location' => '',
'title' => ''
],
'members' => [
],
'role' => ''
]
],
'etag' => '',
'version' => 0
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/:resource:setIamPolicy');
$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}}/v1/:resource:setIamPolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"policy": {
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:resource:setIamPolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"policy": {
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:resource:setIamPolicy", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:resource:setIamPolicy"
payload = { "policy": {
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:resource:setIamPolicy"
payload <- "{\n \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\n }\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}}/v1/:resource:setIamPolicy")
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 \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:resource:setIamPolicy') do |req|
req.body = "{\n \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:resource:setIamPolicy";
let payload = json!({"policy": json!({
"bindings": (
json!({
"condition": json!({
"description": "",
"expression": "",
"location": "",
"title": ""
}),
"members": (),
"role": ""
})
),
"etag": "",
"version": 0
})});
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}}/v1/:resource:setIamPolicy \
--header 'content-type: application/json' \
--data '{
"policy": {
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
}
}'
echo '{
"policy": {
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
}
}' | \
http POST {{baseUrl}}/v1/:resource:setIamPolicy \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "policy": {\n "bindings": [\n {\n "condition": {\n "description": "",\n "expression": "",\n "location": "",\n "title": ""\n },\n "members": [],\n "role": ""\n }\n ],\n "etag": "",\n "version": 0\n }\n}' \
--output-document \
- {{baseUrl}}/v1/:resource:setIamPolicy
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["policy": [
"bindings": [
[
"condition": [
"description": "",
"expression": "",
"location": "",
"title": ""
],
"members": [],
"role": ""
]
],
"etag": "",
"version": 0
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:resource:setIamPolicy")! 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
iap.testIamPermissions
{{baseUrl}}/v1/:resource:testIamPermissions
QUERY PARAMS
resource
BODY json
{
"permissions": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:resource:testIamPermissions");
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 \"permissions\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:resource:testIamPermissions" {:content-type :json
:form-params {:permissions []}})
require "http/client"
url = "{{baseUrl}}/v1/:resource:testIamPermissions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"permissions\": []\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}}/v1/:resource:testIamPermissions"),
Content = new StringContent("{\n \"permissions\": []\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}}/v1/:resource:testIamPermissions");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"permissions\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:resource:testIamPermissions"
payload := strings.NewReader("{\n \"permissions\": []\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/v1/:resource:testIamPermissions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 23
{
"permissions": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:resource:testIamPermissions")
.setHeader("content-type", "application/json")
.setBody("{\n \"permissions\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:resource:testIamPermissions"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"permissions\": []\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 \"permissions\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:resource:testIamPermissions")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:resource:testIamPermissions")
.header("content-type", "application/json")
.body("{\n \"permissions\": []\n}")
.asString();
const data = JSON.stringify({
permissions: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:resource:testIamPermissions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:resource:testIamPermissions',
headers: {'content-type': 'application/json'},
data: {permissions: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:resource:testIamPermissions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"permissions":[]}'
};
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}}/v1/:resource:testIamPermissions',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "permissions": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"permissions\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:resource:testIamPermissions")
.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/v1/:resource:testIamPermissions',
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({permissions: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:resource:testIamPermissions',
headers: {'content-type': 'application/json'},
body: {permissions: []},
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}}/v1/:resource:testIamPermissions');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
permissions: []
});
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}}/v1/:resource:testIamPermissions',
headers: {'content-type': 'application/json'},
data: {permissions: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:resource:testIamPermissions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"permissions":[]}'
};
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 = @{ @"permissions": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:resource:testIamPermissions"]
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}}/v1/:resource:testIamPermissions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"permissions\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:resource:testIamPermissions",
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([
'permissions' => [
]
]),
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}}/v1/:resource:testIamPermissions', [
'body' => '{
"permissions": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:resource:testIamPermissions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'permissions' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'permissions' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/:resource:testIamPermissions');
$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}}/v1/:resource:testIamPermissions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"permissions": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:resource:testIamPermissions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"permissions": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"permissions\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:resource:testIamPermissions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:resource:testIamPermissions"
payload = { "permissions": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:resource:testIamPermissions"
payload <- "{\n \"permissions\": []\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}}/v1/:resource:testIamPermissions")
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 \"permissions\": []\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/v1/:resource:testIamPermissions') do |req|
req.body = "{\n \"permissions\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:resource:testIamPermissions";
let payload = json!({"permissions": ()});
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}}/v1/:resource:testIamPermissions \
--header 'content-type: application/json' \
--data '{
"permissions": []
}'
echo '{
"permissions": []
}' | \
http POST {{baseUrl}}/v1/:resource:testIamPermissions \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "permissions": []\n}' \
--output-document \
- {{baseUrl}}/v1/:resource:testIamPermissions
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["permissions": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:resource:testIamPermissions")! 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()
PATCH
iap.updateIapSettings
{{baseUrl}}/v1/:name:iapSettings
QUERY PARAMS
name
BODY json
{
"accessSettings": {
"allowedDomainsSettings": {
"domains": [],
"enable": false
},
"corsSettings": {
"allowHttpOptions": false
},
"gcipSettings": {
"loginPageUri": "",
"tenantIds": []
},
"oauthSettings": {
"loginHint": "",
"programmaticClients": []
},
"policyDelegationSettings": {
"iamPermission": "",
"iamServiceName": "",
"policyName": {
"id": "",
"region": "",
"type": ""
},
"resource": {
"expectedNextState": {},
"labels": {},
"name": "",
"service": "",
"type": ""
}
},
"reauthSettings": {
"maxAge": "",
"method": "",
"policyType": ""
}
},
"applicationSettings": {
"accessDeniedPageSettings": {
"accessDeniedPageUri": "",
"generateTroubleshootingUri": false,
"remediationTokenGenerationEnabled": false
},
"attributePropagationSettings": {
"enable": false,
"expression": "",
"outputCredentials": []
},
"cookieDomain": "",
"csmSettings": {
"rctokenAud": ""
}
},
"name": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:iapSettings");
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 \"accessSettings\": {\n \"allowedDomainsSettings\": {\n \"domains\": [],\n \"enable\": false\n },\n \"corsSettings\": {\n \"allowHttpOptions\": false\n },\n \"gcipSettings\": {\n \"loginPageUri\": \"\",\n \"tenantIds\": []\n },\n \"oauthSettings\": {\n \"loginHint\": \"\",\n \"programmaticClients\": []\n },\n \"policyDelegationSettings\": {\n \"iamPermission\": \"\",\n \"iamServiceName\": \"\",\n \"policyName\": {\n \"id\": \"\",\n \"region\": \"\",\n \"type\": \"\"\n },\n \"resource\": {\n \"expectedNextState\": {},\n \"labels\": {},\n \"name\": \"\",\n \"service\": \"\",\n \"type\": \"\"\n }\n },\n \"reauthSettings\": {\n \"maxAge\": \"\",\n \"method\": \"\",\n \"policyType\": \"\"\n }\n },\n \"applicationSettings\": {\n \"accessDeniedPageSettings\": {\n \"accessDeniedPageUri\": \"\",\n \"generateTroubleshootingUri\": false,\n \"remediationTokenGenerationEnabled\": false\n },\n \"attributePropagationSettings\": {\n \"enable\": false,\n \"expression\": \"\",\n \"outputCredentials\": []\n },\n \"cookieDomain\": \"\",\n \"csmSettings\": {\n \"rctokenAud\": \"\"\n }\n },\n \"name\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/v1/:name:iapSettings" {:content-type :json
:form-params {:accessSettings {:allowedDomainsSettings {:domains []
:enable false}
:corsSettings {:allowHttpOptions false}
:gcipSettings {:loginPageUri ""
:tenantIds []}
:oauthSettings {:loginHint ""
:programmaticClients []}
:policyDelegationSettings {:iamPermission ""
:iamServiceName ""
:policyName {:id ""
:region ""
:type ""}
:resource {:expectedNextState {}
:labels {}
:name ""
:service ""
:type ""}}
:reauthSettings {:maxAge ""
:method ""
:policyType ""}}
:applicationSettings {:accessDeniedPageSettings {:accessDeniedPageUri ""
:generateTroubleshootingUri false
:remediationTokenGenerationEnabled false}
:attributePropagationSettings {:enable false
:expression ""
:outputCredentials []}
:cookieDomain ""
:csmSettings {:rctokenAud ""}}
:name ""}})
require "http/client"
url = "{{baseUrl}}/v1/:name:iapSettings"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accessSettings\": {\n \"allowedDomainsSettings\": {\n \"domains\": [],\n \"enable\": false\n },\n \"corsSettings\": {\n \"allowHttpOptions\": false\n },\n \"gcipSettings\": {\n \"loginPageUri\": \"\",\n \"tenantIds\": []\n },\n \"oauthSettings\": {\n \"loginHint\": \"\",\n \"programmaticClients\": []\n },\n \"policyDelegationSettings\": {\n \"iamPermission\": \"\",\n \"iamServiceName\": \"\",\n \"policyName\": {\n \"id\": \"\",\n \"region\": \"\",\n \"type\": \"\"\n },\n \"resource\": {\n \"expectedNextState\": {},\n \"labels\": {},\n \"name\": \"\",\n \"service\": \"\",\n \"type\": \"\"\n }\n },\n \"reauthSettings\": {\n \"maxAge\": \"\",\n \"method\": \"\",\n \"policyType\": \"\"\n }\n },\n \"applicationSettings\": {\n \"accessDeniedPageSettings\": {\n \"accessDeniedPageUri\": \"\",\n \"generateTroubleshootingUri\": false,\n \"remediationTokenGenerationEnabled\": false\n },\n \"attributePropagationSettings\": {\n \"enable\": false,\n \"expression\": \"\",\n \"outputCredentials\": []\n },\n \"cookieDomain\": \"\",\n \"csmSettings\": {\n \"rctokenAud\": \"\"\n }\n },\n \"name\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/v1/:name:iapSettings"),
Content = new StringContent("{\n \"accessSettings\": {\n \"allowedDomainsSettings\": {\n \"domains\": [],\n \"enable\": false\n },\n \"corsSettings\": {\n \"allowHttpOptions\": false\n },\n \"gcipSettings\": {\n \"loginPageUri\": \"\",\n \"tenantIds\": []\n },\n \"oauthSettings\": {\n \"loginHint\": \"\",\n \"programmaticClients\": []\n },\n \"policyDelegationSettings\": {\n \"iamPermission\": \"\",\n \"iamServiceName\": \"\",\n \"policyName\": {\n \"id\": \"\",\n \"region\": \"\",\n \"type\": \"\"\n },\n \"resource\": {\n \"expectedNextState\": {},\n \"labels\": {},\n \"name\": \"\",\n \"service\": \"\",\n \"type\": \"\"\n }\n },\n \"reauthSettings\": {\n \"maxAge\": \"\",\n \"method\": \"\",\n \"policyType\": \"\"\n }\n },\n \"applicationSettings\": {\n \"accessDeniedPageSettings\": {\n \"accessDeniedPageUri\": \"\",\n \"generateTroubleshootingUri\": false,\n \"remediationTokenGenerationEnabled\": false\n },\n \"attributePropagationSettings\": {\n \"enable\": false,\n \"expression\": \"\",\n \"outputCredentials\": []\n },\n \"cookieDomain\": \"\",\n \"csmSettings\": {\n \"rctokenAud\": \"\"\n }\n },\n \"name\": \"\"\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}}/v1/:name:iapSettings");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accessSettings\": {\n \"allowedDomainsSettings\": {\n \"domains\": [],\n \"enable\": false\n },\n \"corsSettings\": {\n \"allowHttpOptions\": false\n },\n \"gcipSettings\": {\n \"loginPageUri\": \"\",\n \"tenantIds\": []\n },\n \"oauthSettings\": {\n \"loginHint\": \"\",\n \"programmaticClients\": []\n },\n \"policyDelegationSettings\": {\n \"iamPermission\": \"\",\n \"iamServiceName\": \"\",\n \"policyName\": {\n \"id\": \"\",\n \"region\": \"\",\n \"type\": \"\"\n },\n \"resource\": {\n \"expectedNextState\": {},\n \"labels\": {},\n \"name\": \"\",\n \"service\": \"\",\n \"type\": \"\"\n }\n },\n \"reauthSettings\": {\n \"maxAge\": \"\",\n \"method\": \"\",\n \"policyType\": \"\"\n }\n },\n \"applicationSettings\": {\n \"accessDeniedPageSettings\": {\n \"accessDeniedPageUri\": \"\",\n \"generateTroubleshootingUri\": false,\n \"remediationTokenGenerationEnabled\": false\n },\n \"attributePropagationSettings\": {\n \"enable\": false,\n \"expression\": \"\",\n \"outputCredentials\": []\n },\n \"cookieDomain\": \"\",\n \"csmSettings\": {\n \"rctokenAud\": \"\"\n }\n },\n \"name\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:iapSettings"
payload := strings.NewReader("{\n \"accessSettings\": {\n \"allowedDomainsSettings\": {\n \"domains\": [],\n \"enable\": false\n },\n \"corsSettings\": {\n \"allowHttpOptions\": false\n },\n \"gcipSettings\": {\n \"loginPageUri\": \"\",\n \"tenantIds\": []\n },\n \"oauthSettings\": {\n \"loginHint\": \"\",\n \"programmaticClients\": []\n },\n \"policyDelegationSettings\": {\n \"iamPermission\": \"\",\n \"iamServiceName\": \"\",\n \"policyName\": {\n \"id\": \"\",\n \"region\": \"\",\n \"type\": \"\"\n },\n \"resource\": {\n \"expectedNextState\": {},\n \"labels\": {},\n \"name\": \"\",\n \"service\": \"\",\n \"type\": \"\"\n }\n },\n \"reauthSettings\": {\n \"maxAge\": \"\",\n \"method\": \"\",\n \"policyType\": \"\"\n }\n },\n \"applicationSettings\": {\n \"accessDeniedPageSettings\": {\n \"accessDeniedPageUri\": \"\",\n \"generateTroubleshootingUri\": false,\n \"remediationTokenGenerationEnabled\": false\n },\n \"attributePropagationSettings\": {\n \"enable\": false,\n \"expression\": \"\",\n \"outputCredentials\": []\n },\n \"cookieDomain\": \"\",\n \"csmSettings\": {\n \"rctokenAud\": \"\"\n }\n },\n \"name\": \"\"\n}")
req, _ := http.NewRequest("PATCH", 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))
}
PATCH /baseUrl/v1/:name:iapSettings HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1166
{
"accessSettings": {
"allowedDomainsSettings": {
"domains": [],
"enable": false
},
"corsSettings": {
"allowHttpOptions": false
},
"gcipSettings": {
"loginPageUri": "",
"tenantIds": []
},
"oauthSettings": {
"loginHint": "",
"programmaticClients": []
},
"policyDelegationSettings": {
"iamPermission": "",
"iamServiceName": "",
"policyName": {
"id": "",
"region": "",
"type": ""
},
"resource": {
"expectedNextState": {},
"labels": {},
"name": "",
"service": "",
"type": ""
}
},
"reauthSettings": {
"maxAge": "",
"method": "",
"policyType": ""
}
},
"applicationSettings": {
"accessDeniedPageSettings": {
"accessDeniedPageUri": "",
"generateTroubleshootingUri": false,
"remediationTokenGenerationEnabled": false
},
"attributePropagationSettings": {
"enable": false,
"expression": "",
"outputCredentials": []
},
"cookieDomain": "",
"csmSettings": {
"rctokenAud": ""
}
},
"name": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/v1/:name:iapSettings")
.setHeader("content-type", "application/json")
.setBody("{\n \"accessSettings\": {\n \"allowedDomainsSettings\": {\n \"domains\": [],\n \"enable\": false\n },\n \"corsSettings\": {\n \"allowHttpOptions\": false\n },\n \"gcipSettings\": {\n \"loginPageUri\": \"\",\n \"tenantIds\": []\n },\n \"oauthSettings\": {\n \"loginHint\": \"\",\n \"programmaticClients\": []\n },\n \"policyDelegationSettings\": {\n \"iamPermission\": \"\",\n \"iamServiceName\": \"\",\n \"policyName\": {\n \"id\": \"\",\n \"region\": \"\",\n \"type\": \"\"\n },\n \"resource\": {\n \"expectedNextState\": {},\n \"labels\": {},\n \"name\": \"\",\n \"service\": \"\",\n \"type\": \"\"\n }\n },\n \"reauthSettings\": {\n \"maxAge\": \"\",\n \"method\": \"\",\n \"policyType\": \"\"\n }\n },\n \"applicationSettings\": {\n \"accessDeniedPageSettings\": {\n \"accessDeniedPageUri\": \"\",\n \"generateTroubleshootingUri\": false,\n \"remediationTokenGenerationEnabled\": false\n },\n \"attributePropagationSettings\": {\n \"enable\": false,\n \"expression\": \"\",\n \"outputCredentials\": []\n },\n \"cookieDomain\": \"\",\n \"csmSettings\": {\n \"rctokenAud\": \"\"\n }\n },\n \"name\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:iapSettings"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"accessSettings\": {\n \"allowedDomainsSettings\": {\n \"domains\": [],\n \"enable\": false\n },\n \"corsSettings\": {\n \"allowHttpOptions\": false\n },\n \"gcipSettings\": {\n \"loginPageUri\": \"\",\n \"tenantIds\": []\n },\n \"oauthSettings\": {\n \"loginHint\": \"\",\n \"programmaticClients\": []\n },\n \"policyDelegationSettings\": {\n \"iamPermission\": \"\",\n \"iamServiceName\": \"\",\n \"policyName\": {\n \"id\": \"\",\n \"region\": \"\",\n \"type\": \"\"\n },\n \"resource\": {\n \"expectedNextState\": {},\n \"labels\": {},\n \"name\": \"\",\n \"service\": \"\",\n \"type\": \"\"\n }\n },\n \"reauthSettings\": {\n \"maxAge\": \"\",\n \"method\": \"\",\n \"policyType\": \"\"\n }\n },\n \"applicationSettings\": {\n \"accessDeniedPageSettings\": {\n \"accessDeniedPageUri\": \"\",\n \"generateTroubleshootingUri\": false,\n \"remediationTokenGenerationEnabled\": false\n },\n \"attributePropagationSettings\": {\n \"enable\": false,\n \"expression\": \"\",\n \"outputCredentials\": []\n },\n \"cookieDomain\": \"\",\n \"csmSettings\": {\n \"rctokenAud\": \"\"\n }\n },\n \"name\": \"\"\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 \"accessSettings\": {\n \"allowedDomainsSettings\": {\n \"domains\": [],\n \"enable\": false\n },\n \"corsSettings\": {\n \"allowHttpOptions\": false\n },\n \"gcipSettings\": {\n \"loginPageUri\": \"\",\n \"tenantIds\": []\n },\n \"oauthSettings\": {\n \"loginHint\": \"\",\n \"programmaticClients\": []\n },\n \"policyDelegationSettings\": {\n \"iamPermission\": \"\",\n \"iamServiceName\": \"\",\n \"policyName\": {\n \"id\": \"\",\n \"region\": \"\",\n \"type\": \"\"\n },\n \"resource\": {\n \"expectedNextState\": {},\n \"labels\": {},\n \"name\": \"\",\n \"service\": \"\",\n \"type\": \"\"\n }\n },\n \"reauthSettings\": {\n \"maxAge\": \"\",\n \"method\": \"\",\n \"policyType\": \"\"\n }\n },\n \"applicationSettings\": {\n \"accessDeniedPageSettings\": {\n \"accessDeniedPageUri\": \"\",\n \"generateTroubleshootingUri\": false,\n \"remediationTokenGenerationEnabled\": false\n },\n \"attributePropagationSettings\": {\n \"enable\": false,\n \"expression\": \"\",\n \"outputCredentials\": []\n },\n \"cookieDomain\": \"\",\n \"csmSettings\": {\n \"rctokenAud\": \"\"\n }\n },\n \"name\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:iapSettings")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/v1/:name:iapSettings")
.header("content-type", "application/json")
.body("{\n \"accessSettings\": {\n \"allowedDomainsSettings\": {\n \"domains\": [],\n \"enable\": false\n },\n \"corsSettings\": {\n \"allowHttpOptions\": false\n },\n \"gcipSettings\": {\n \"loginPageUri\": \"\",\n \"tenantIds\": []\n },\n \"oauthSettings\": {\n \"loginHint\": \"\",\n \"programmaticClients\": []\n },\n \"policyDelegationSettings\": {\n \"iamPermission\": \"\",\n \"iamServiceName\": \"\",\n \"policyName\": {\n \"id\": \"\",\n \"region\": \"\",\n \"type\": \"\"\n },\n \"resource\": {\n \"expectedNextState\": {},\n \"labels\": {},\n \"name\": \"\",\n \"service\": \"\",\n \"type\": \"\"\n }\n },\n \"reauthSettings\": {\n \"maxAge\": \"\",\n \"method\": \"\",\n \"policyType\": \"\"\n }\n },\n \"applicationSettings\": {\n \"accessDeniedPageSettings\": {\n \"accessDeniedPageUri\": \"\",\n \"generateTroubleshootingUri\": false,\n \"remediationTokenGenerationEnabled\": false\n },\n \"attributePropagationSettings\": {\n \"enable\": false,\n \"expression\": \"\",\n \"outputCredentials\": []\n },\n \"cookieDomain\": \"\",\n \"csmSettings\": {\n \"rctokenAud\": \"\"\n }\n },\n \"name\": \"\"\n}")
.asString();
const data = JSON.stringify({
accessSettings: {
allowedDomainsSettings: {
domains: [],
enable: false
},
corsSettings: {
allowHttpOptions: false
},
gcipSettings: {
loginPageUri: '',
tenantIds: []
},
oauthSettings: {
loginHint: '',
programmaticClients: []
},
policyDelegationSettings: {
iamPermission: '',
iamServiceName: '',
policyName: {
id: '',
region: '',
type: ''
},
resource: {
expectedNextState: {},
labels: {},
name: '',
service: '',
type: ''
}
},
reauthSettings: {
maxAge: '',
method: '',
policyType: ''
}
},
applicationSettings: {
accessDeniedPageSettings: {
accessDeniedPageUri: '',
generateTroubleshootingUri: false,
remediationTokenGenerationEnabled: false
},
attributePropagationSettings: {
enable: false,
expression: '',
outputCredentials: []
},
cookieDomain: '',
csmSettings: {
rctokenAud: ''
}
},
name: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/v1/:name:iapSettings');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1/:name:iapSettings',
headers: {'content-type': 'application/json'},
data: {
accessSettings: {
allowedDomainsSettings: {domains: [], enable: false},
corsSettings: {allowHttpOptions: false},
gcipSettings: {loginPageUri: '', tenantIds: []},
oauthSettings: {loginHint: '', programmaticClients: []},
policyDelegationSettings: {
iamPermission: '',
iamServiceName: '',
policyName: {id: '', region: '', type: ''},
resource: {expectedNextState: {}, labels: {}, name: '', service: '', type: ''}
},
reauthSettings: {maxAge: '', method: '', policyType: ''}
},
applicationSettings: {
accessDeniedPageSettings: {
accessDeniedPageUri: '',
generateTroubleshootingUri: false,
remediationTokenGenerationEnabled: false
},
attributePropagationSettings: {enable: false, expression: '', outputCredentials: []},
cookieDomain: '',
csmSettings: {rctokenAud: ''}
},
name: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:iapSettings';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accessSettings":{"allowedDomainsSettings":{"domains":[],"enable":false},"corsSettings":{"allowHttpOptions":false},"gcipSettings":{"loginPageUri":"","tenantIds":[]},"oauthSettings":{"loginHint":"","programmaticClients":[]},"policyDelegationSettings":{"iamPermission":"","iamServiceName":"","policyName":{"id":"","region":"","type":""},"resource":{"expectedNextState":{},"labels":{},"name":"","service":"","type":""}},"reauthSettings":{"maxAge":"","method":"","policyType":""}},"applicationSettings":{"accessDeniedPageSettings":{"accessDeniedPageUri":"","generateTroubleshootingUri":false,"remediationTokenGenerationEnabled":false},"attributePropagationSettings":{"enable":false,"expression":"","outputCredentials":[]},"cookieDomain":"","csmSettings":{"rctokenAud":""}},"name":""}'
};
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}}/v1/:name:iapSettings',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accessSettings": {\n "allowedDomainsSettings": {\n "domains": [],\n "enable": false\n },\n "corsSettings": {\n "allowHttpOptions": false\n },\n "gcipSettings": {\n "loginPageUri": "",\n "tenantIds": []\n },\n "oauthSettings": {\n "loginHint": "",\n "programmaticClients": []\n },\n "policyDelegationSettings": {\n "iamPermission": "",\n "iamServiceName": "",\n "policyName": {\n "id": "",\n "region": "",\n "type": ""\n },\n "resource": {\n "expectedNextState": {},\n "labels": {},\n "name": "",\n "service": "",\n "type": ""\n }\n },\n "reauthSettings": {\n "maxAge": "",\n "method": "",\n "policyType": ""\n }\n },\n "applicationSettings": {\n "accessDeniedPageSettings": {\n "accessDeniedPageUri": "",\n "generateTroubleshootingUri": false,\n "remediationTokenGenerationEnabled": false\n },\n "attributePropagationSettings": {\n "enable": false,\n "expression": "",\n "outputCredentials": []\n },\n "cookieDomain": "",\n "csmSettings": {\n "rctokenAud": ""\n }\n },\n "name": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accessSettings\": {\n \"allowedDomainsSettings\": {\n \"domains\": [],\n \"enable\": false\n },\n \"corsSettings\": {\n \"allowHttpOptions\": false\n },\n \"gcipSettings\": {\n \"loginPageUri\": \"\",\n \"tenantIds\": []\n },\n \"oauthSettings\": {\n \"loginHint\": \"\",\n \"programmaticClients\": []\n },\n \"policyDelegationSettings\": {\n \"iamPermission\": \"\",\n \"iamServiceName\": \"\",\n \"policyName\": {\n \"id\": \"\",\n \"region\": \"\",\n \"type\": \"\"\n },\n \"resource\": {\n \"expectedNextState\": {},\n \"labels\": {},\n \"name\": \"\",\n \"service\": \"\",\n \"type\": \"\"\n }\n },\n \"reauthSettings\": {\n \"maxAge\": \"\",\n \"method\": \"\",\n \"policyType\": \"\"\n }\n },\n \"applicationSettings\": {\n \"accessDeniedPageSettings\": {\n \"accessDeniedPageUri\": \"\",\n \"generateTroubleshootingUri\": false,\n \"remediationTokenGenerationEnabled\": false\n },\n \"attributePropagationSettings\": {\n \"enable\": false,\n \"expression\": \"\",\n \"outputCredentials\": []\n },\n \"cookieDomain\": \"\",\n \"csmSettings\": {\n \"rctokenAud\": \"\"\n }\n },\n \"name\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:iapSettings")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name:iapSettings',
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({
accessSettings: {
allowedDomainsSettings: {domains: [], enable: false},
corsSettings: {allowHttpOptions: false},
gcipSettings: {loginPageUri: '', tenantIds: []},
oauthSettings: {loginHint: '', programmaticClients: []},
policyDelegationSettings: {
iamPermission: '',
iamServiceName: '',
policyName: {id: '', region: '', type: ''},
resource: {expectedNextState: {}, labels: {}, name: '', service: '', type: ''}
},
reauthSettings: {maxAge: '', method: '', policyType: ''}
},
applicationSettings: {
accessDeniedPageSettings: {
accessDeniedPageUri: '',
generateTroubleshootingUri: false,
remediationTokenGenerationEnabled: false
},
attributePropagationSettings: {enable: false, expression: '', outputCredentials: []},
cookieDomain: '',
csmSettings: {rctokenAud: ''}
},
name: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1/:name:iapSettings',
headers: {'content-type': 'application/json'},
body: {
accessSettings: {
allowedDomainsSettings: {domains: [], enable: false},
corsSettings: {allowHttpOptions: false},
gcipSettings: {loginPageUri: '', tenantIds: []},
oauthSettings: {loginHint: '', programmaticClients: []},
policyDelegationSettings: {
iamPermission: '',
iamServiceName: '',
policyName: {id: '', region: '', type: ''},
resource: {expectedNextState: {}, labels: {}, name: '', service: '', type: ''}
},
reauthSettings: {maxAge: '', method: '', policyType: ''}
},
applicationSettings: {
accessDeniedPageSettings: {
accessDeniedPageUri: '',
generateTroubleshootingUri: false,
remediationTokenGenerationEnabled: false
},
attributePropagationSettings: {enable: false, expression: '', outputCredentials: []},
cookieDomain: '',
csmSettings: {rctokenAud: ''}
},
name: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/v1/:name:iapSettings');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accessSettings: {
allowedDomainsSettings: {
domains: [],
enable: false
},
corsSettings: {
allowHttpOptions: false
},
gcipSettings: {
loginPageUri: '',
tenantIds: []
},
oauthSettings: {
loginHint: '',
programmaticClients: []
},
policyDelegationSettings: {
iamPermission: '',
iamServiceName: '',
policyName: {
id: '',
region: '',
type: ''
},
resource: {
expectedNextState: {},
labels: {},
name: '',
service: '',
type: ''
}
},
reauthSettings: {
maxAge: '',
method: '',
policyType: ''
}
},
applicationSettings: {
accessDeniedPageSettings: {
accessDeniedPageUri: '',
generateTroubleshootingUri: false,
remediationTokenGenerationEnabled: false
},
attributePropagationSettings: {
enable: false,
expression: '',
outputCredentials: []
},
cookieDomain: '',
csmSettings: {
rctokenAud: ''
}
},
name: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1/:name:iapSettings',
headers: {'content-type': 'application/json'},
data: {
accessSettings: {
allowedDomainsSettings: {domains: [], enable: false},
corsSettings: {allowHttpOptions: false},
gcipSettings: {loginPageUri: '', tenantIds: []},
oauthSettings: {loginHint: '', programmaticClients: []},
policyDelegationSettings: {
iamPermission: '',
iamServiceName: '',
policyName: {id: '', region: '', type: ''},
resource: {expectedNextState: {}, labels: {}, name: '', service: '', type: ''}
},
reauthSettings: {maxAge: '', method: '', policyType: ''}
},
applicationSettings: {
accessDeniedPageSettings: {
accessDeniedPageUri: '',
generateTroubleshootingUri: false,
remediationTokenGenerationEnabled: false
},
attributePropagationSettings: {enable: false, expression: '', outputCredentials: []},
cookieDomain: '',
csmSettings: {rctokenAud: ''}
},
name: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:iapSettings';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accessSettings":{"allowedDomainsSettings":{"domains":[],"enable":false},"corsSettings":{"allowHttpOptions":false},"gcipSettings":{"loginPageUri":"","tenantIds":[]},"oauthSettings":{"loginHint":"","programmaticClients":[]},"policyDelegationSettings":{"iamPermission":"","iamServiceName":"","policyName":{"id":"","region":"","type":""},"resource":{"expectedNextState":{},"labels":{},"name":"","service":"","type":""}},"reauthSettings":{"maxAge":"","method":"","policyType":""}},"applicationSettings":{"accessDeniedPageSettings":{"accessDeniedPageUri":"","generateTroubleshootingUri":false,"remediationTokenGenerationEnabled":false},"attributePropagationSettings":{"enable":false,"expression":"","outputCredentials":[]},"cookieDomain":"","csmSettings":{"rctokenAud":""}},"name":""}'
};
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 = @{ @"accessSettings": @{ @"allowedDomainsSettings": @{ @"domains": @[ ], @"enable": @NO }, @"corsSettings": @{ @"allowHttpOptions": @NO }, @"gcipSettings": @{ @"loginPageUri": @"", @"tenantIds": @[ ] }, @"oauthSettings": @{ @"loginHint": @"", @"programmaticClients": @[ ] }, @"policyDelegationSettings": @{ @"iamPermission": @"", @"iamServiceName": @"", @"policyName": @{ @"id": @"", @"region": @"", @"type": @"" }, @"resource": @{ @"expectedNextState": @{ }, @"labels": @{ }, @"name": @"", @"service": @"", @"type": @"" } }, @"reauthSettings": @{ @"maxAge": @"", @"method": @"", @"policyType": @"" } },
@"applicationSettings": @{ @"accessDeniedPageSettings": @{ @"accessDeniedPageUri": @"", @"generateTroubleshootingUri": @NO, @"remediationTokenGenerationEnabled": @NO }, @"attributePropagationSettings": @{ @"enable": @NO, @"expression": @"", @"outputCredentials": @[ ] }, @"cookieDomain": @"", @"csmSettings": @{ @"rctokenAud": @"" } },
@"name": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:iapSettings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[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}}/v1/:name:iapSettings" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accessSettings\": {\n \"allowedDomainsSettings\": {\n \"domains\": [],\n \"enable\": false\n },\n \"corsSettings\": {\n \"allowHttpOptions\": false\n },\n \"gcipSettings\": {\n \"loginPageUri\": \"\",\n \"tenantIds\": []\n },\n \"oauthSettings\": {\n \"loginHint\": \"\",\n \"programmaticClients\": []\n },\n \"policyDelegationSettings\": {\n \"iamPermission\": \"\",\n \"iamServiceName\": \"\",\n \"policyName\": {\n \"id\": \"\",\n \"region\": \"\",\n \"type\": \"\"\n },\n \"resource\": {\n \"expectedNextState\": {},\n \"labels\": {},\n \"name\": \"\",\n \"service\": \"\",\n \"type\": \"\"\n }\n },\n \"reauthSettings\": {\n \"maxAge\": \"\",\n \"method\": \"\",\n \"policyType\": \"\"\n }\n },\n \"applicationSettings\": {\n \"accessDeniedPageSettings\": {\n \"accessDeniedPageUri\": \"\",\n \"generateTroubleshootingUri\": false,\n \"remediationTokenGenerationEnabled\": false\n },\n \"attributePropagationSettings\": {\n \"enable\": false,\n \"expression\": \"\",\n \"outputCredentials\": []\n },\n \"cookieDomain\": \"\",\n \"csmSettings\": {\n \"rctokenAud\": \"\"\n }\n },\n \"name\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:iapSettings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'accessSettings' => [
'allowedDomainsSettings' => [
'domains' => [
],
'enable' => null
],
'corsSettings' => [
'allowHttpOptions' => null
],
'gcipSettings' => [
'loginPageUri' => '',
'tenantIds' => [
]
],
'oauthSettings' => [
'loginHint' => '',
'programmaticClients' => [
]
],
'policyDelegationSettings' => [
'iamPermission' => '',
'iamServiceName' => '',
'policyName' => [
'id' => '',
'region' => '',
'type' => ''
],
'resource' => [
'expectedNextState' => [
],
'labels' => [
],
'name' => '',
'service' => '',
'type' => ''
]
],
'reauthSettings' => [
'maxAge' => '',
'method' => '',
'policyType' => ''
]
],
'applicationSettings' => [
'accessDeniedPageSettings' => [
'accessDeniedPageUri' => '',
'generateTroubleshootingUri' => null,
'remediationTokenGenerationEnabled' => null
],
'attributePropagationSettings' => [
'enable' => null,
'expression' => '',
'outputCredentials' => [
]
],
'cookieDomain' => '',
'csmSettings' => [
'rctokenAud' => ''
]
],
'name' => ''
]),
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('PATCH', '{{baseUrl}}/v1/:name:iapSettings', [
'body' => '{
"accessSettings": {
"allowedDomainsSettings": {
"domains": [],
"enable": false
},
"corsSettings": {
"allowHttpOptions": false
},
"gcipSettings": {
"loginPageUri": "",
"tenantIds": []
},
"oauthSettings": {
"loginHint": "",
"programmaticClients": []
},
"policyDelegationSettings": {
"iamPermission": "",
"iamServiceName": "",
"policyName": {
"id": "",
"region": "",
"type": ""
},
"resource": {
"expectedNextState": {},
"labels": {},
"name": "",
"service": "",
"type": ""
}
},
"reauthSettings": {
"maxAge": "",
"method": "",
"policyType": ""
}
},
"applicationSettings": {
"accessDeniedPageSettings": {
"accessDeniedPageUri": "",
"generateTroubleshootingUri": false,
"remediationTokenGenerationEnabled": false
},
"attributePropagationSettings": {
"enable": false,
"expression": "",
"outputCredentials": []
},
"cookieDomain": "",
"csmSettings": {
"rctokenAud": ""
}
},
"name": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:iapSettings');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accessSettings' => [
'allowedDomainsSettings' => [
'domains' => [
],
'enable' => null
],
'corsSettings' => [
'allowHttpOptions' => null
],
'gcipSettings' => [
'loginPageUri' => '',
'tenantIds' => [
]
],
'oauthSettings' => [
'loginHint' => '',
'programmaticClients' => [
]
],
'policyDelegationSettings' => [
'iamPermission' => '',
'iamServiceName' => '',
'policyName' => [
'id' => '',
'region' => '',
'type' => ''
],
'resource' => [
'expectedNextState' => [
],
'labels' => [
],
'name' => '',
'service' => '',
'type' => ''
]
],
'reauthSettings' => [
'maxAge' => '',
'method' => '',
'policyType' => ''
]
],
'applicationSettings' => [
'accessDeniedPageSettings' => [
'accessDeniedPageUri' => '',
'generateTroubleshootingUri' => null,
'remediationTokenGenerationEnabled' => null
],
'attributePropagationSettings' => [
'enable' => null,
'expression' => '',
'outputCredentials' => [
]
],
'cookieDomain' => '',
'csmSettings' => [
'rctokenAud' => ''
]
],
'name' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accessSettings' => [
'allowedDomainsSettings' => [
'domains' => [
],
'enable' => null
],
'corsSettings' => [
'allowHttpOptions' => null
],
'gcipSettings' => [
'loginPageUri' => '',
'tenantIds' => [
]
],
'oauthSettings' => [
'loginHint' => '',
'programmaticClients' => [
]
],
'policyDelegationSettings' => [
'iamPermission' => '',
'iamServiceName' => '',
'policyName' => [
'id' => '',
'region' => '',
'type' => ''
],
'resource' => [
'expectedNextState' => [
],
'labels' => [
],
'name' => '',
'service' => '',
'type' => ''
]
],
'reauthSettings' => [
'maxAge' => '',
'method' => '',
'policyType' => ''
]
],
'applicationSettings' => [
'accessDeniedPageSettings' => [
'accessDeniedPageUri' => '',
'generateTroubleshootingUri' => null,
'remediationTokenGenerationEnabled' => null
],
'attributePropagationSettings' => [
'enable' => null,
'expression' => '',
'outputCredentials' => [
]
],
'cookieDomain' => '',
'csmSettings' => [
'rctokenAud' => ''
]
],
'name' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:iapSettings');
$request->setRequestMethod('PATCH');
$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}}/v1/:name:iapSettings' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accessSettings": {
"allowedDomainsSettings": {
"domains": [],
"enable": false
},
"corsSettings": {
"allowHttpOptions": false
},
"gcipSettings": {
"loginPageUri": "",
"tenantIds": []
},
"oauthSettings": {
"loginHint": "",
"programmaticClients": []
},
"policyDelegationSettings": {
"iamPermission": "",
"iamServiceName": "",
"policyName": {
"id": "",
"region": "",
"type": ""
},
"resource": {
"expectedNextState": {},
"labels": {},
"name": "",
"service": "",
"type": ""
}
},
"reauthSettings": {
"maxAge": "",
"method": "",
"policyType": ""
}
},
"applicationSettings": {
"accessDeniedPageSettings": {
"accessDeniedPageUri": "",
"generateTroubleshootingUri": false,
"remediationTokenGenerationEnabled": false
},
"attributePropagationSettings": {
"enable": false,
"expression": "",
"outputCredentials": []
},
"cookieDomain": "",
"csmSettings": {
"rctokenAud": ""
}
},
"name": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:iapSettings' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accessSettings": {
"allowedDomainsSettings": {
"domains": [],
"enable": false
},
"corsSettings": {
"allowHttpOptions": false
},
"gcipSettings": {
"loginPageUri": "",
"tenantIds": []
},
"oauthSettings": {
"loginHint": "",
"programmaticClients": []
},
"policyDelegationSettings": {
"iamPermission": "",
"iamServiceName": "",
"policyName": {
"id": "",
"region": "",
"type": ""
},
"resource": {
"expectedNextState": {},
"labels": {},
"name": "",
"service": "",
"type": ""
}
},
"reauthSettings": {
"maxAge": "",
"method": "",
"policyType": ""
}
},
"applicationSettings": {
"accessDeniedPageSettings": {
"accessDeniedPageUri": "",
"generateTroubleshootingUri": false,
"remediationTokenGenerationEnabled": false
},
"attributePropagationSettings": {
"enable": false,
"expression": "",
"outputCredentials": []
},
"cookieDomain": "",
"csmSettings": {
"rctokenAud": ""
}
},
"name": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accessSettings\": {\n \"allowedDomainsSettings\": {\n \"domains\": [],\n \"enable\": false\n },\n \"corsSettings\": {\n \"allowHttpOptions\": false\n },\n \"gcipSettings\": {\n \"loginPageUri\": \"\",\n \"tenantIds\": []\n },\n \"oauthSettings\": {\n \"loginHint\": \"\",\n \"programmaticClients\": []\n },\n \"policyDelegationSettings\": {\n \"iamPermission\": \"\",\n \"iamServiceName\": \"\",\n \"policyName\": {\n \"id\": \"\",\n \"region\": \"\",\n \"type\": \"\"\n },\n \"resource\": {\n \"expectedNextState\": {},\n \"labels\": {},\n \"name\": \"\",\n \"service\": \"\",\n \"type\": \"\"\n }\n },\n \"reauthSettings\": {\n \"maxAge\": \"\",\n \"method\": \"\",\n \"policyType\": \"\"\n }\n },\n \"applicationSettings\": {\n \"accessDeniedPageSettings\": {\n \"accessDeniedPageUri\": \"\",\n \"generateTroubleshootingUri\": false,\n \"remediationTokenGenerationEnabled\": false\n },\n \"attributePropagationSettings\": {\n \"enable\": false,\n \"expression\": \"\",\n \"outputCredentials\": []\n },\n \"cookieDomain\": \"\",\n \"csmSettings\": {\n \"rctokenAud\": \"\"\n }\n },\n \"name\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/v1/:name:iapSettings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:iapSettings"
payload = {
"accessSettings": {
"allowedDomainsSettings": {
"domains": [],
"enable": False
},
"corsSettings": { "allowHttpOptions": False },
"gcipSettings": {
"loginPageUri": "",
"tenantIds": []
},
"oauthSettings": {
"loginHint": "",
"programmaticClients": []
},
"policyDelegationSettings": {
"iamPermission": "",
"iamServiceName": "",
"policyName": {
"id": "",
"region": "",
"type": ""
},
"resource": {
"expectedNextState": {},
"labels": {},
"name": "",
"service": "",
"type": ""
}
},
"reauthSettings": {
"maxAge": "",
"method": "",
"policyType": ""
}
},
"applicationSettings": {
"accessDeniedPageSettings": {
"accessDeniedPageUri": "",
"generateTroubleshootingUri": False,
"remediationTokenGenerationEnabled": False
},
"attributePropagationSettings": {
"enable": False,
"expression": "",
"outputCredentials": []
},
"cookieDomain": "",
"csmSettings": { "rctokenAud": "" }
},
"name": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:iapSettings"
payload <- "{\n \"accessSettings\": {\n \"allowedDomainsSettings\": {\n \"domains\": [],\n \"enable\": false\n },\n \"corsSettings\": {\n \"allowHttpOptions\": false\n },\n \"gcipSettings\": {\n \"loginPageUri\": \"\",\n \"tenantIds\": []\n },\n \"oauthSettings\": {\n \"loginHint\": \"\",\n \"programmaticClients\": []\n },\n \"policyDelegationSettings\": {\n \"iamPermission\": \"\",\n \"iamServiceName\": \"\",\n \"policyName\": {\n \"id\": \"\",\n \"region\": \"\",\n \"type\": \"\"\n },\n \"resource\": {\n \"expectedNextState\": {},\n \"labels\": {},\n \"name\": \"\",\n \"service\": \"\",\n \"type\": \"\"\n }\n },\n \"reauthSettings\": {\n \"maxAge\": \"\",\n \"method\": \"\",\n \"policyType\": \"\"\n }\n },\n \"applicationSettings\": {\n \"accessDeniedPageSettings\": {\n \"accessDeniedPageUri\": \"\",\n \"generateTroubleshootingUri\": false,\n \"remediationTokenGenerationEnabled\": false\n },\n \"attributePropagationSettings\": {\n \"enable\": false,\n \"expression\": \"\",\n \"outputCredentials\": []\n },\n \"cookieDomain\": \"\",\n \"csmSettings\": {\n \"rctokenAud\": \"\"\n }\n },\n \"name\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:iapSettings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accessSettings\": {\n \"allowedDomainsSettings\": {\n \"domains\": [],\n \"enable\": false\n },\n \"corsSettings\": {\n \"allowHttpOptions\": false\n },\n \"gcipSettings\": {\n \"loginPageUri\": \"\",\n \"tenantIds\": []\n },\n \"oauthSettings\": {\n \"loginHint\": \"\",\n \"programmaticClients\": []\n },\n \"policyDelegationSettings\": {\n \"iamPermission\": \"\",\n \"iamServiceName\": \"\",\n \"policyName\": {\n \"id\": \"\",\n \"region\": \"\",\n \"type\": \"\"\n },\n \"resource\": {\n \"expectedNextState\": {},\n \"labels\": {},\n \"name\": \"\",\n \"service\": \"\",\n \"type\": \"\"\n }\n },\n \"reauthSettings\": {\n \"maxAge\": \"\",\n \"method\": \"\",\n \"policyType\": \"\"\n }\n },\n \"applicationSettings\": {\n \"accessDeniedPageSettings\": {\n \"accessDeniedPageUri\": \"\",\n \"generateTroubleshootingUri\": false,\n \"remediationTokenGenerationEnabled\": false\n },\n \"attributePropagationSettings\": {\n \"enable\": false,\n \"expression\": \"\",\n \"outputCredentials\": []\n },\n \"cookieDomain\": \"\",\n \"csmSettings\": {\n \"rctokenAud\": \"\"\n }\n },\n \"name\": \"\"\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.patch('/baseUrl/v1/:name:iapSettings') do |req|
req.body = "{\n \"accessSettings\": {\n \"allowedDomainsSettings\": {\n \"domains\": [],\n \"enable\": false\n },\n \"corsSettings\": {\n \"allowHttpOptions\": false\n },\n \"gcipSettings\": {\n \"loginPageUri\": \"\",\n \"tenantIds\": []\n },\n \"oauthSettings\": {\n \"loginHint\": \"\",\n \"programmaticClients\": []\n },\n \"policyDelegationSettings\": {\n \"iamPermission\": \"\",\n \"iamServiceName\": \"\",\n \"policyName\": {\n \"id\": \"\",\n \"region\": \"\",\n \"type\": \"\"\n },\n \"resource\": {\n \"expectedNextState\": {},\n \"labels\": {},\n \"name\": \"\",\n \"service\": \"\",\n \"type\": \"\"\n }\n },\n \"reauthSettings\": {\n \"maxAge\": \"\",\n \"method\": \"\",\n \"policyType\": \"\"\n }\n },\n \"applicationSettings\": {\n \"accessDeniedPageSettings\": {\n \"accessDeniedPageUri\": \"\",\n \"generateTroubleshootingUri\": false,\n \"remediationTokenGenerationEnabled\": false\n },\n \"attributePropagationSettings\": {\n \"enable\": false,\n \"expression\": \"\",\n \"outputCredentials\": []\n },\n \"cookieDomain\": \"\",\n \"csmSettings\": {\n \"rctokenAud\": \"\"\n }\n },\n \"name\": \"\"\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}}/v1/:name:iapSettings";
let payload = json!({
"accessSettings": json!({
"allowedDomainsSettings": json!({
"domains": (),
"enable": false
}),
"corsSettings": json!({"allowHttpOptions": false}),
"gcipSettings": json!({
"loginPageUri": "",
"tenantIds": ()
}),
"oauthSettings": json!({
"loginHint": "",
"programmaticClients": ()
}),
"policyDelegationSettings": json!({
"iamPermission": "",
"iamServiceName": "",
"policyName": json!({
"id": "",
"region": "",
"type": ""
}),
"resource": json!({
"expectedNextState": json!({}),
"labels": json!({}),
"name": "",
"service": "",
"type": ""
})
}),
"reauthSettings": json!({
"maxAge": "",
"method": "",
"policyType": ""
})
}),
"applicationSettings": json!({
"accessDeniedPageSettings": json!({
"accessDeniedPageUri": "",
"generateTroubleshootingUri": false,
"remediationTokenGenerationEnabled": false
}),
"attributePropagationSettings": json!({
"enable": false,
"expression": "",
"outputCredentials": ()
}),
"cookieDomain": "",
"csmSettings": json!({"rctokenAud": ""})
}),
"name": ""
});
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("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/v1/:name:iapSettings \
--header 'content-type: application/json' \
--data '{
"accessSettings": {
"allowedDomainsSettings": {
"domains": [],
"enable": false
},
"corsSettings": {
"allowHttpOptions": false
},
"gcipSettings": {
"loginPageUri": "",
"tenantIds": []
},
"oauthSettings": {
"loginHint": "",
"programmaticClients": []
},
"policyDelegationSettings": {
"iamPermission": "",
"iamServiceName": "",
"policyName": {
"id": "",
"region": "",
"type": ""
},
"resource": {
"expectedNextState": {},
"labels": {},
"name": "",
"service": "",
"type": ""
}
},
"reauthSettings": {
"maxAge": "",
"method": "",
"policyType": ""
}
},
"applicationSettings": {
"accessDeniedPageSettings": {
"accessDeniedPageUri": "",
"generateTroubleshootingUri": false,
"remediationTokenGenerationEnabled": false
},
"attributePropagationSettings": {
"enable": false,
"expression": "",
"outputCredentials": []
},
"cookieDomain": "",
"csmSettings": {
"rctokenAud": ""
}
},
"name": ""
}'
echo '{
"accessSettings": {
"allowedDomainsSettings": {
"domains": [],
"enable": false
},
"corsSettings": {
"allowHttpOptions": false
},
"gcipSettings": {
"loginPageUri": "",
"tenantIds": []
},
"oauthSettings": {
"loginHint": "",
"programmaticClients": []
},
"policyDelegationSettings": {
"iamPermission": "",
"iamServiceName": "",
"policyName": {
"id": "",
"region": "",
"type": ""
},
"resource": {
"expectedNextState": {},
"labels": {},
"name": "",
"service": "",
"type": ""
}
},
"reauthSettings": {
"maxAge": "",
"method": "",
"policyType": ""
}
},
"applicationSettings": {
"accessDeniedPageSettings": {
"accessDeniedPageUri": "",
"generateTroubleshootingUri": false,
"remediationTokenGenerationEnabled": false
},
"attributePropagationSettings": {
"enable": false,
"expression": "",
"outputCredentials": []
},
"cookieDomain": "",
"csmSettings": {
"rctokenAud": ""
}
},
"name": ""
}' | \
http PATCH {{baseUrl}}/v1/:name:iapSettings \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "accessSettings": {\n "allowedDomainsSettings": {\n "domains": [],\n "enable": false\n },\n "corsSettings": {\n "allowHttpOptions": false\n },\n "gcipSettings": {\n "loginPageUri": "",\n "tenantIds": []\n },\n "oauthSettings": {\n "loginHint": "",\n "programmaticClients": []\n },\n "policyDelegationSettings": {\n "iamPermission": "",\n "iamServiceName": "",\n "policyName": {\n "id": "",\n "region": "",\n "type": ""\n },\n "resource": {\n "expectedNextState": {},\n "labels": {},\n "name": "",\n "service": "",\n "type": ""\n }\n },\n "reauthSettings": {\n "maxAge": "",\n "method": "",\n "policyType": ""\n }\n },\n "applicationSettings": {\n "accessDeniedPageSettings": {\n "accessDeniedPageUri": "",\n "generateTroubleshootingUri": false,\n "remediationTokenGenerationEnabled": false\n },\n "attributePropagationSettings": {\n "enable": false,\n "expression": "",\n "outputCredentials": []\n },\n "cookieDomain": "",\n "csmSettings": {\n "rctokenAud": ""\n }\n },\n "name": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:name:iapSettings
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accessSettings": [
"allowedDomainsSettings": [
"domains": [],
"enable": false
],
"corsSettings": ["allowHttpOptions": false],
"gcipSettings": [
"loginPageUri": "",
"tenantIds": []
],
"oauthSettings": [
"loginHint": "",
"programmaticClients": []
],
"policyDelegationSettings": [
"iamPermission": "",
"iamServiceName": "",
"policyName": [
"id": "",
"region": "",
"type": ""
],
"resource": [
"expectedNextState": [],
"labels": [],
"name": "",
"service": "",
"type": ""
]
],
"reauthSettings": [
"maxAge": "",
"method": "",
"policyType": ""
]
],
"applicationSettings": [
"accessDeniedPageSettings": [
"accessDeniedPageUri": "",
"generateTroubleshootingUri": false,
"remediationTokenGenerationEnabled": false
],
"attributePropagationSettings": [
"enable": false,
"expression": "",
"outputCredentials": []
],
"cookieDomain": "",
"csmSettings": ["rctokenAud": ""]
],
"name": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:iapSettings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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
iap.validateAttributeExpression
{{baseUrl}}/v1/:name:validateAttributeExpression
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:validateAttributeExpression");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:validateAttributeExpression")
require "http/client"
url = "{{baseUrl}}/v1/:name:validateAttributeExpression"
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}}/v1/:name:validateAttributeExpression"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name:validateAttributeExpression");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:validateAttributeExpression"
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/v1/:name:validateAttributeExpression HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:validateAttributeExpression")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:validateAttributeExpression"))
.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}}/v1/:name:validateAttributeExpression")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:validateAttributeExpression")
.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}}/v1/:name:validateAttributeExpression');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:validateAttributeExpression'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:validateAttributeExpression';
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}}/v1/:name:validateAttributeExpression',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:validateAttributeExpression")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name:validateAttributeExpression',
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}}/v1/:name:validateAttributeExpression'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:name:validateAttributeExpression');
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}}/v1/:name:validateAttributeExpression'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:validateAttributeExpression';
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}}/v1/:name:validateAttributeExpression"]
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}}/v1/:name:validateAttributeExpression" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:validateAttributeExpression",
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}}/v1/:name:validateAttributeExpression');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:validateAttributeExpression');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:name:validateAttributeExpression');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:validateAttributeExpression' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:validateAttributeExpression' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/v1/:name:validateAttributeExpression")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:validateAttributeExpression"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:validateAttributeExpression"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:validateAttributeExpression")
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/v1/:name:validateAttributeExpression') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:validateAttributeExpression";
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}}/v1/:name:validateAttributeExpression
http POST {{baseUrl}}/v1/:name:validateAttributeExpression
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/v1/:name:validateAttributeExpression
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:validateAttributeExpression")! 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()