Invoice Example Process API
HEAD
Dmn- example-invoice-c7-assignApprover (HEAD)
{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover
BODY json
{
"amount": "",
"invoiceCategory": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "HEAD");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover");
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 \"amount\": \"\",\n \"invoiceCategory\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/head "{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover" {:content-type :json
:form-params {:amount ""
:invoiceCategory ""}})
require "http/client"
url = "{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\n}"
response = HTTP::Client.head url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Head,
RequestUri = new Uri("{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover"),
Content = new StringContent("{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\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}}/Dmn/DMNs/example-invoice-c7-assignApprover");
var request = new RestRequest("", Method.Head);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover"
payload := strings.NewReader("{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\n}")
req, _ := http.NewRequest("HEAD", 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))
}
HEAD /baseUrl/Dmn/DMNs/example-invoice-c7-assignApprover HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 43
{
"amount": "",
"invoiceCategory": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("HEAD", "{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover")
.setHeader("content-type", "application/json")
.setBody("{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover"))
.header("content-type", "application/json")
.method("HEAD", HttpRequest.BodyPublishers.ofString("{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\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 \"amount\": \"\",\n \"invoiceCategory\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover")
.head()
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.head("{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover")
.header("content-type", "application/json")
.body("{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\n}")
.asString();
const data = JSON.stringify({
amount: '',
invoiceCategory: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('HEAD', '{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'HEAD',
url: '{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover',
headers: {'content-type': 'application/json'},
data: {amount: '', invoiceCategory: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"amount":"","invoiceCategory":""}'
};
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}}/Dmn/DMNs/example-invoice-c7-assignApprover',
method: 'HEAD',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "amount": "",\n "invoiceCategory": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover")
.head()
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'HEAD',
hostname: 'example.com',
port: null,
path: '/baseUrl/Dmn/DMNs/example-invoice-c7-assignApprover',
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({amount: '', invoiceCategory: ''}));
req.end();
const request = require('request');
const options = {
method: 'HEAD',
url: '{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover',
headers: {'content-type': 'application/json'},
body: {amount: '', invoiceCategory: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('HEAD', '{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
amount: '',
invoiceCategory: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'HEAD',
url: '{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover',
headers: {'content-type': 'application/json'},
data: {amount: '', invoiceCategory: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"amount":"","invoiceCategory":""}'
};
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 = @{ @"amount": @"",
@"invoiceCategory": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"HEAD"];
[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}}/Dmn/DMNs/example-invoice-c7-assignApprover" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\n}" in
Client.call ~headers ~body `HEAD uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "HEAD",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '',
'invoiceCategory' => ''
]),
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('HEAD', '{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover', [
'body' => '{
"amount": "",
"invoiceCategory": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover');
$request->setMethod(HTTP_METH_HEAD);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'amount' => '',
'invoiceCategory' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'amount' => '',
'invoiceCategory' => ''
]));
$request->setRequestUrl('{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover');
$request->setRequestMethod('HEAD');
$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}}/Dmn/DMNs/example-invoice-c7-assignApprover' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"amount": "",
"invoiceCategory": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"amount": "",
"invoiceCategory": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("HEAD", "/baseUrl/Dmn/DMNs/example-invoice-c7-assignApprover", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover"
payload = {
"amount": "",
"invoiceCategory": ""
}
headers = {"content-type": "application/json"}
response = requests.head(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover"
payload <- "{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\n}"
encode <- "json"
response <- VERB("HEAD", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Head.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\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.head('/baseUrl/Dmn/DMNs/example-invoice-c7-assignApprover') do |req|
req.body = "{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\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}}/Dmn/DMNs/example-invoice-c7-assignApprover";
let payload = json!({
"amount": "",
"invoiceCategory": ""
});
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("HEAD").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request HEAD \
--url {{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover \
--header 'content-type: application/json' \
--data '{
"amount": "",
"invoiceCategory": ""
}'
echo '{
"amount": "",
"invoiceCategory": ""
}' | \
http HEAD {{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover \
content-type:application/json
wget --quiet \
--method HEAD \
--header 'content-type: application/json' \
--body-data '{\n "amount": "",\n "invoiceCategory": ""\n}' \
--output-document \
- {{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"amount": "",
"invoiceCategory": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/Dmn/DMNs/example-invoice-c7-assignApprover")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "HEAD"
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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
[
"management"
]
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
[
"management"
]
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
[
"accounting",
"sales"
]
HEAD
Bpmn- example-invoice-c7
{{baseUrl}}/Bpmn/example-invoice-c7
BODY json
{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": "",
"shouldFail": false,
"invoiceReviewedMock": {
"clarified": false
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "HEAD");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/Bpmn/example-invoice-c7");
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 \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\",\n \"shouldFail\": false,\n \"invoiceReviewedMock\": {\n \"clarified\": false\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/head "{{baseUrl}}/Bpmn/example-invoice-c7" {:content-type :json
:form-params {:creditor ""
:amount ""
:invoiceCategory ""
:invoiceNumber ""
:shouldFail false
:invoiceReviewedMock {:clarified false}}})
require "http/client"
url = "{{baseUrl}}/Bpmn/example-invoice-c7"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\",\n \"shouldFail\": false,\n \"invoiceReviewedMock\": {\n \"clarified\": false\n }\n}"
response = HTTP::Client.head url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Head,
RequestUri = new Uri("{{baseUrl}}/Bpmn/example-invoice-c7"),
Content = new StringContent("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\",\n \"shouldFail\": false,\n \"invoiceReviewedMock\": {\n \"clarified\": false\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/Bpmn/example-invoice-c7");
var request = new RestRequest("", Method.Head);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\",\n \"shouldFail\": false,\n \"invoiceReviewedMock\": {\n \"clarified\": false\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/Bpmn/example-invoice-c7"
payload := strings.NewReader("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\",\n \"shouldFail\": false,\n \"invoiceReviewedMock\": {\n \"clarified\": false\n }\n}")
req, _ := http.NewRequest("HEAD", 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))
}
HEAD /baseUrl/Bpmn/example-invoice-c7 HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 162
{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": "",
"shouldFail": false,
"invoiceReviewedMock": {
"clarified": false
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("HEAD", "{{baseUrl}}/Bpmn/example-invoice-c7")
.setHeader("content-type", "application/json")
.setBody("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\",\n \"shouldFail\": false,\n \"invoiceReviewedMock\": {\n \"clarified\": false\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/Bpmn/example-invoice-c7"))
.header("content-type", "application/json")
.method("HEAD", HttpRequest.BodyPublishers.ofString("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\",\n \"shouldFail\": false,\n \"invoiceReviewedMock\": {\n \"clarified\": false\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\",\n \"shouldFail\": false,\n \"invoiceReviewedMock\": {\n \"clarified\": false\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/Bpmn/example-invoice-c7")
.head()
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.head("{{baseUrl}}/Bpmn/example-invoice-c7")
.header("content-type", "application/json")
.body("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\",\n \"shouldFail\": false,\n \"invoiceReviewedMock\": {\n \"clarified\": false\n }\n}")
.asString();
const data = JSON.stringify({
creditor: '',
amount: '',
invoiceCategory: '',
invoiceNumber: '',
shouldFail: false,
invoiceReviewedMock: {
clarified: false
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('HEAD', '{{baseUrl}}/Bpmn/example-invoice-c7');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'HEAD',
url: '{{baseUrl}}/Bpmn/example-invoice-c7',
headers: {'content-type': 'application/json'},
data: {
creditor: '',
amount: '',
invoiceCategory: '',
invoiceNumber: '',
shouldFail: false,
invoiceReviewedMock: {clarified: false}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/Bpmn/example-invoice-c7';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"creditor":"","amount":"","invoiceCategory":"","invoiceNumber":"","shouldFail":false,"invoiceReviewedMock":{"clarified":false}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/Bpmn/example-invoice-c7',
method: 'HEAD',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "creditor": "",\n "amount": "",\n "invoiceCategory": "",\n "invoiceNumber": "",\n "shouldFail": false,\n "invoiceReviewedMock": {\n "clarified": false\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\",\n \"shouldFail\": false,\n \"invoiceReviewedMock\": {\n \"clarified\": false\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/Bpmn/example-invoice-c7")
.head()
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'HEAD',
hostname: 'example.com',
port: null,
path: '/baseUrl/Bpmn/example-invoice-c7',
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({
creditor: '',
amount: '',
invoiceCategory: '',
invoiceNumber: '',
shouldFail: false,
invoiceReviewedMock: {clarified: false}
}));
req.end();
const request = require('request');
const options = {
method: 'HEAD',
url: '{{baseUrl}}/Bpmn/example-invoice-c7',
headers: {'content-type': 'application/json'},
body: {
creditor: '',
amount: '',
invoiceCategory: '',
invoiceNumber: '',
shouldFail: false,
invoiceReviewedMock: {clarified: false}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('HEAD', '{{baseUrl}}/Bpmn/example-invoice-c7');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
creditor: '',
amount: '',
invoiceCategory: '',
invoiceNumber: '',
shouldFail: false,
invoiceReviewedMock: {
clarified: false
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'HEAD',
url: '{{baseUrl}}/Bpmn/example-invoice-c7',
headers: {'content-type': 'application/json'},
data: {
creditor: '',
amount: '',
invoiceCategory: '',
invoiceNumber: '',
shouldFail: false,
invoiceReviewedMock: {clarified: false}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/Bpmn/example-invoice-c7';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"creditor":"","amount":"","invoiceCategory":"","invoiceNumber":"","shouldFail":false,"invoiceReviewedMock":{"clarified":false}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"creditor": @"",
@"amount": @"",
@"invoiceCategory": @"",
@"invoiceNumber": @"",
@"shouldFail": @NO,
@"invoiceReviewedMock": @{ @"clarified": @NO } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/Bpmn/example-invoice-c7"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"HEAD"];
[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}}/Bpmn/example-invoice-c7" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\",\n \"shouldFail\": false,\n \"invoiceReviewedMock\": {\n \"clarified\": false\n }\n}" in
Client.call ~headers ~body `HEAD uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/Bpmn/example-invoice-c7",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "HEAD",
CURLOPT_POSTFIELDS => json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => '',
'shouldFail' => null,
'invoiceReviewedMock' => [
'clarified' => null
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('HEAD', '{{baseUrl}}/Bpmn/example-invoice-c7', [
'body' => '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": "",
"shouldFail": false,
"invoiceReviewedMock": {
"clarified": false
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/Bpmn/example-invoice-c7');
$request->setMethod(HTTP_METH_HEAD);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => '',
'shouldFail' => null,
'invoiceReviewedMock' => [
'clarified' => null
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => '',
'shouldFail' => null,
'invoiceReviewedMock' => [
'clarified' => null
]
]));
$request->setRequestUrl('{{baseUrl}}/Bpmn/example-invoice-c7');
$request->setRequestMethod('HEAD');
$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}}/Bpmn/example-invoice-c7' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": "",
"shouldFail": false,
"invoiceReviewedMock": {
"clarified": false
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/Bpmn/example-invoice-c7' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": "",
"shouldFail": false,
"invoiceReviewedMock": {
"clarified": false
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\",\n \"shouldFail\": false,\n \"invoiceReviewedMock\": {\n \"clarified\": false\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("HEAD", "/baseUrl/Bpmn/example-invoice-c7", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/Bpmn/example-invoice-c7"
payload = {
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": "",
"shouldFail": False,
"invoiceReviewedMock": { "clarified": False }
}
headers = {"content-type": "application/json"}
response = requests.head(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/Bpmn/example-invoice-c7"
payload <- "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\",\n \"shouldFail\": false,\n \"invoiceReviewedMock\": {\n \"clarified\": false\n }\n}"
encode <- "json"
response <- VERB("HEAD", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/Bpmn/example-invoice-c7")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Head.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\",\n \"shouldFail\": false,\n \"invoiceReviewedMock\": {\n \"clarified\": false\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.head('/baseUrl/Bpmn/example-invoice-c7') do |req|
req.body = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\",\n \"shouldFail\": false,\n \"invoiceReviewedMock\": {\n \"clarified\": false\n }\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/Bpmn/example-invoice-c7";
let payload = json!({
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": "",
"shouldFail": false,
"invoiceReviewedMock": json!({"clarified": false})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("HEAD").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request HEAD \
--url {{baseUrl}}/Bpmn/example-invoice-c7 \
--header 'content-type: application/json' \
--data '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": "",
"shouldFail": false,
"invoiceReviewedMock": {
"clarified": false
}
}'
echo '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": "",
"shouldFail": false,
"invoiceReviewedMock": {
"clarified": false
}
}' | \
http HEAD {{baseUrl}}/Bpmn/example-invoice-c7 \
content-type:application/json
wget --quiet \
--method HEAD \
--header 'content-type: application/json' \
--body-data '{\n "creditor": "",\n "amount": "",\n "invoiceCategory": "",\n "invoiceNumber": "",\n "shouldFail": false,\n "invoiceReviewedMock": {\n "clarified": false\n }\n}' \
--output-document \
- {{baseUrl}}/Bpmn/example-invoice-c7
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": "",
"shouldFail": false,
"invoiceReviewedMock": ["clarified": false]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/Bpmn/example-invoice-c7")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "HEAD"
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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"approved": true
}
HEAD
Dmn- example-invoice-c7-assignApprover
{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover
BODY json
{
"amount": "",
"invoiceCategory": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "HEAD");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover");
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 \"amount\": \"\",\n \"invoiceCategory\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/head "{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover" {:content-type :json
:form-params {:amount ""
:invoiceCategory ""}})
require "http/client"
url = "{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\n}"
response = HTTP::Client.head url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Head,
RequestUri = new Uri("{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover"),
Content = new StringContent("{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\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}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover");
var request = new RestRequest("", Method.Head);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover"
payload := strings.NewReader("{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\n}")
req, _ := http.NewRequest("HEAD", 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))
}
HEAD /baseUrl/Dmn/example-invoice-c7/example-invoice-c7-assignApprover HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 43
{
"amount": "",
"invoiceCategory": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("HEAD", "{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover")
.setHeader("content-type", "application/json")
.setBody("{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover"))
.header("content-type", "application/json")
.method("HEAD", HttpRequest.BodyPublishers.ofString("{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\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 \"amount\": \"\",\n \"invoiceCategory\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover")
.head()
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.head("{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover")
.header("content-type", "application/json")
.body("{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\n}")
.asString();
const data = JSON.stringify({
amount: '',
invoiceCategory: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('HEAD', '{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'HEAD',
url: '{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover',
headers: {'content-type': 'application/json'},
data: {amount: '', invoiceCategory: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"amount":"","invoiceCategory":""}'
};
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}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover',
method: 'HEAD',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "amount": "",\n "invoiceCategory": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover")
.head()
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'HEAD',
hostname: 'example.com',
port: null,
path: '/baseUrl/Dmn/example-invoice-c7/example-invoice-c7-assignApprover',
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({amount: '', invoiceCategory: ''}));
req.end();
const request = require('request');
const options = {
method: 'HEAD',
url: '{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover',
headers: {'content-type': 'application/json'},
body: {amount: '', invoiceCategory: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('HEAD', '{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
amount: '',
invoiceCategory: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'HEAD',
url: '{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover',
headers: {'content-type': 'application/json'},
data: {amount: '', invoiceCategory: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"amount":"","invoiceCategory":""}'
};
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 = @{ @"amount": @"",
@"invoiceCategory": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"HEAD"];
[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}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\n}" in
Client.call ~headers ~body `HEAD uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "HEAD",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '',
'invoiceCategory' => ''
]),
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('HEAD', '{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover', [
'body' => '{
"amount": "",
"invoiceCategory": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover');
$request->setMethod(HTTP_METH_HEAD);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'amount' => '',
'invoiceCategory' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'amount' => '',
'invoiceCategory' => ''
]));
$request->setRequestUrl('{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover');
$request->setRequestMethod('HEAD');
$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}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"amount": "",
"invoiceCategory": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"amount": "",
"invoiceCategory": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("HEAD", "/baseUrl/Dmn/example-invoice-c7/example-invoice-c7-assignApprover", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover"
payload = {
"amount": "",
"invoiceCategory": ""
}
headers = {"content-type": "application/json"}
response = requests.head(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover"
payload <- "{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\n}"
encode <- "json"
response <- VERB("HEAD", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Head.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\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.head('/baseUrl/Dmn/example-invoice-c7/example-invoice-c7-assignApprover') do |req|
req.body = "{\n \"amount\": \"\",\n \"invoiceCategory\": \"\"\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}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover";
let payload = json!({
"amount": "",
"invoiceCategory": ""
});
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("HEAD").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request HEAD \
--url {{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover \
--header 'content-type: application/json' \
--data '{
"amount": "",
"invoiceCategory": ""
}'
echo '{
"amount": "",
"invoiceCategory": ""
}' | \
http HEAD {{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover \
content-type:application/json
wget --quiet \
--method HEAD \
--header 'content-type: application/json' \
--body-data '{\n "amount": "",\n "invoiceCategory": ""\n}' \
--output-document \
- {{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"amount": "",
"invoiceCategory": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/Dmn/example-invoice-c7/example-invoice-c7-assignApprover")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "HEAD"
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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
[
"management"
]
HEAD
UserTask- ApproveInvoiceUT
{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT
BODY json
{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "HEAD");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT");
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 \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/head "{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT" {:content-type :json
:form-params {:creditor ""
:amount ""
:invoiceCategory ""
:invoiceNumber ""}})
require "http/client"
url = "{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}"
response = HTTP::Client.head url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Head,
RequestUri = new Uri("{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT"),
Content = new StringContent("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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}}/UserTask/example-invoice-c7/ApproveInvoiceUT");
var request = new RestRequest("", Method.Head);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT"
payload := strings.NewReader("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
req, _ := http.NewRequest("HEAD", 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))
}
HEAD /baseUrl/UserTask/example-invoice-c7/ApproveInvoiceUT HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 84
{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("HEAD", "{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT")
.setHeader("content-type", "application/json")
.setBody("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT"))
.header("content-type", "application/json")
.method("HEAD", HttpRequest.BodyPublishers.ofString("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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 \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT")
.head()
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.head("{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT")
.header("content-type", "application/json")
.body("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
.asString();
const data = JSON.stringify({
creditor: '',
amount: '',
invoiceCategory: '',
invoiceNumber: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('HEAD', '{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT',
headers: {'content-type': 'application/json'},
data: {creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"creditor":"","amount":"","invoiceCategory":"","invoiceNumber":""}'
};
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}}/UserTask/example-invoice-c7/ApproveInvoiceUT',
method: 'HEAD',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "creditor": "",\n "amount": "",\n "invoiceCategory": "",\n "invoiceNumber": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT")
.head()
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'HEAD',
hostname: 'example.com',
port: null,
path: '/baseUrl/UserTask/example-invoice-c7/ApproveInvoiceUT',
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({creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''}));
req.end();
const request = require('request');
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT',
headers: {'content-type': 'application/json'},
body: {creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('HEAD', '{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
creditor: '',
amount: '',
invoiceCategory: '',
invoiceNumber: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT',
headers: {'content-type': 'application/json'},
data: {creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"creditor":"","amount":"","invoiceCategory":"","invoiceNumber":""}'
};
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 = @{ @"creditor": @"",
@"amount": @"",
@"invoiceCategory": @"",
@"invoiceNumber": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"HEAD"];
[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}}/UserTask/example-invoice-c7/ApproveInvoiceUT" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}" in
Client.call ~headers ~body `HEAD uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "HEAD",
CURLOPT_POSTFIELDS => json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => ''
]),
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('HEAD', '{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT', [
'body' => '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT');
$request->setMethod(HTTP_METH_HEAD);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => ''
]));
$request->setRequestUrl('{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT');
$request->setRequestMethod('HEAD');
$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}}/UserTask/example-invoice-c7/ApproveInvoiceUT' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("HEAD", "/baseUrl/UserTask/example-invoice-c7/ApproveInvoiceUT", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT"
payload = {
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
headers = {"content-type": "application/json"}
response = requests.head(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT"
payload <- "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}"
encode <- "json"
response <- VERB("HEAD", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Head.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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.head('/baseUrl/UserTask/example-invoice-c7/ApproveInvoiceUT') do |req|
req.body = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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}}/UserTask/example-invoice-c7/ApproveInvoiceUT";
let payload = json!({
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
});
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("HEAD").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request HEAD \
--url {{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT \
--header 'content-type: application/json' \
--data '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}'
echo '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}' | \
http HEAD {{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT \
content-type:application/json
wget --quiet \
--method HEAD \
--header 'content-type: application/json' \
--body-data '{\n "creditor": "",\n "amount": "",\n "invoiceCategory": "",\n "invoiceNumber": ""\n}' \
--output-document \
- {{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/UserTask/example-invoice-c7/ApproveInvoiceUT")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "HEAD"
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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"approved": true
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"approved": true
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"approved": false
}
HEAD
UserTask- PrepareBankTransferUT
{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT
BODY json
{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "HEAD");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT");
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 \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/head "{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT" {:content-type :json
:form-params {:creditor "Great Pizza for Everyone Inc."
:amount 300
:invoiceCategory "Travel Expenses"
:invoiceNumber "I-12345"}})
require "http/client"
url = "{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\n}"
response = HTTP::Client.head url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Head,
RequestUri = new Uri("{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT"),
Content = new StringContent("{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\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}}/UserTask/example-invoice-c7/PrepareBankTransferUT");
var request = new RestRequest("", Method.Head);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT"
payload := strings.NewReader("{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\n}")
req, _ := http.NewRequest("HEAD", 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))
}
HEAD /baseUrl/UserTask/example-invoice-c7/PrepareBankTransferUT HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 136
{
"creditor": "Great Pizza for Everyone Inc.",
"amount": 300,
"invoiceCategory": "Travel Expenses",
"invoiceNumber": "I-12345"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("HEAD", "{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT")
.setHeader("content-type", "application/json")
.setBody("{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT"))
.header("content-type", "application/json")
.method("HEAD", HttpRequest.BodyPublishers.ofString("{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\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 \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT")
.head()
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.head("{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT")
.header("content-type", "application/json")
.body("{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\n}")
.asString();
const data = JSON.stringify({
creditor: 'Great Pizza for Everyone Inc.',
amount: 300,
invoiceCategory: 'Travel Expenses',
invoiceNumber: 'I-12345'
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('HEAD', '{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT',
headers: {'content-type': 'application/json'},
data: {
creditor: 'Great Pizza for Everyone Inc.',
amount: 300,
invoiceCategory: 'Travel Expenses',
invoiceNumber: 'I-12345'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"creditor":"Great Pizza for Everyone Inc.","amount":300,"invoiceCategory":"Travel Expenses","invoiceNumber":"I-12345"}'
};
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}}/UserTask/example-invoice-c7/PrepareBankTransferUT',
method: 'HEAD',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "creditor": "Great Pizza for Everyone Inc.",\n "amount": 300,\n "invoiceCategory": "Travel Expenses",\n "invoiceNumber": "I-12345"\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT")
.head()
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'HEAD',
hostname: 'example.com',
port: null,
path: '/baseUrl/UserTask/example-invoice-c7/PrepareBankTransferUT',
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({
creditor: 'Great Pizza for Everyone Inc.',
amount: 300,
invoiceCategory: 'Travel Expenses',
invoiceNumber: 'I-12345'
}));
req.end();
const request = require('request');
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT',
headers: {'content-type': 'application/json'},
body: {
creditor: 'Great Pizza for Everyone Inc.',
amount: 300,
invoiceCategory: 'Travel Expenses',
invoiceNumber: 'I-12345'
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('HEAD', '{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
creditor: 'Great Pizza for Everyone Inc.',
amount: 300,
invoiceCategory: 'Travel Expenses',
invoiceNumber: 'I-12345'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT',
headers: {'content-type': 'application/json'},
data: {
creditor: 'Great Pizza for Everyone Inc.',
amount: 300,
invoiceCategory: 'Travel Expenses',
invoiceNumber: 'I-12345'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"creditor":"Great Pizza for Everyone Inc.","amount":300,"invoiceCategory":"Travel Expenses","invoiceNumber":"I-12345"}'
};
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 = @{ @"creditor": @"Great Pizza for Everyone Inc.",
@"amount": @300,
@"invoiceCategory": @"Travel Expenses",
@"invoiceNumber": @"I-12345" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"HEAD"];
[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}}/UserTask/example-invoice-c7/PrepareBankTransferUT" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\n}" in
Client.call ~headers ~body `HEAD uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "HEAD",
CURLOPT_POSTFIELDS => json_encode([
'creditor' => 'Great Pizza for Everyone Inc.',
'amount' => 300,
'invoiceCategory' => 'Travel Expenses',
'invoiceNumber' => 'I-12345'
]),
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('HEAD', '{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT', [
'body' => '{
"creditor": "Great Pizza for Everyone Inc.",
"amount": 300,
"invoiceCategory": "Travel Expenses",
"invoiceNumber": "I-12345"
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT');
$request->setMethod(HTTP_METH_HEAD);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'creditor' => 'Great Pizza for Everyone Inc.',
'amount' => 300,
'invoiceCategory' => 'Travel Expenses',
'invoiceNumber' => 'I-12345'
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'creditor' => 'Great Pizza for Everyone Inc.',
'amount' => 300,
'invoiceCategory' => 'Travel Expenses',
'invoiceNumber' => 'I-12345'
]));
$request->setRequestUrl('{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT');
$request->setRequestMethod('HEAD');
$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}}/UserTask/example-invoice-c7/PrepareBankTransferUT' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"creditor": "Great Pizza for Everyone Inc.",
"amount": 300,
"invoiceCategory": "Travel Expenses",
"invoiceNumber": "I-12345"
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"creditor": "Great Pizza for Everyone Inc.",
"amount": 300,
"invoiceCategory": "Travel Expenses",
"invoiceNumber": "I-12345"
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\n}"
headers = { 'content-type': "application/json" }
conn.request("HEAD", "/baseUrl/UserTask/example-invoice-c7/PrepareBankTransferUT", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT"
payload = {
"creditor": "Great Pizza for Everyone Inc.",
"amount": 300,
"invoiceCategory": "Travel Expenses",
"invoiceNumber": "I-12345"
}
headers = {"content-type": "application/json"}
response = requests.head(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT"
payload <- "{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\n}"
encode <- "json"
response <- VERB("HEAD", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Head.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\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.head('/baseUrl/UserTask/example-invoice-c7/PrepareBankTransferUT') do |req|
req.body = "{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\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}}/UserTask/example-invoice-c7/PrepareBankTransferUT";
let payload = json!({
"creditor": "Great Pizza for Everyone Inc.",
"amount": 300,
"invoiceCategory": "Travel Expenses",
"invoiceNumber": "I-12345"
});
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("HEAD").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request HEAD \
--url {{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT \
--header 'content-type: application/json' \
--data '{
"creditor": "Great Pizza for Everyone Inc.",
"amount": 300,
"invoiceCategory": "Travel Expenses",
"invoiceNumber": "I-12345"
}'
echo '{
"creditor": "Great Pizza for Everyone Inc.",
"amount": 300,
"invoiceCategory": "Travel Expenses",
"invoiceNumber": "I-12345"
}' | \
http HEAD {{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT \
content-type:application/json
wget --quiet \
--method HEAD \
--header 'content-type: application/json' \
--body-data '{\n "creditor": "Great Pizza for Everyone Inc.",\n "amount": 300,\n "invoiceCategory": "Travel Expenses",\n "invoiceNumber": "I-12345"\n}' \
--output-document \
- {{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"creditor": "Great Pizza for Everyone Inc.",
"amount": 300,
"invoiceCategory": "Travel Expenses",
"invoiceNumber": "I-12345"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/UserTask/example-invoice-c7/PrepareBankTransferUT")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "HEAD"
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()
HEAD
Bpmn- example-invoice-c7-review
{{baseUrl}}/Bpmn/example-invoice-c7-review
BODY json
{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "HEAD");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/Bpmn/example-invoice-c7-review");
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 \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/head "{{baseUrl}}/Bpmn/example-invoice-c7-review" {:content-type :json
:form-params {:creditor ""
:amount ""
:invoiceCategory ""
:invoiceNumber ""}})
require "http/client"
url = "{{baseUrl}}/Bpmn/example-invoice-c7-review"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}"
response = HTTP::Client.head url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Head,
RequestUri = new Uri("{{baseUrl}}/Bpmn/example-invoice-c7-review"),
Content = new StringContent("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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}}/Bpmn/example-invoice-c7-review");
var request = new RestRequest("", Method.Head);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/Bpmn/example-invoice-c7-review"
payload := strings.NewReader("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
req, _ := http.NewRequest("HEAD", 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))
}
HEAD /baseUrl/Bpmn/example-invoice-c7-review HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 84
{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("HEAD", "{{baseUrl}}/Bpmn/example-invoice-c7-review")
.setHeader("content-type", "application/json")
.setBody("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/Bpmn/example-invoice-c7-review"))
.header("content-type", "application/json")
.method("HEAD", HttpRequest.BodyPublishers.ofString("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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 \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/Bpmn/example-invoice-c7-review")
.head()
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.head("{{baseUrl}}/Bpmn/example-invoice-c7-review")
.header("content-type", "application/json")
.body("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
.asString();
const data = JSON.stringify({
creditor: '',
amount: '',
invoiceCategory: '',
invoiceNumber: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('HEAD', '{{baseUrl}}/Bpmn/example-invoice-c7-review');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'HEAD',
url: '{{baseUrl}}/Bpmn/example-invoice-c7-review',
headers: {'content-type': 'application/json'},
data: {creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/Bpmn/example-invoice-c7-review';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"creditor":"","amount":"","invoiceCategory":"","invoiceNumber":""}'
};
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}}/Bpmn/example-invoice-c7-review',
method: 'HEAD',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "creditor": "",\n "amount": "",\n "invoiceCategory": "",\n "invoiceNumber": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/Bpmn/example-invoice-c7-review")
.head()
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'HEAD',
hostname: 'example.com',
port: null,
path: '/baseUrl/Bpmn/example-invoice-c7-review',
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({creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''}));
req.end();
const request = require('request');
const options = {
method: 'HEAD',
url: '{{baseUrl}}/Bpmn/example-invoice-c7-review',
headers: {'content-type': 'application/json'},
body: {creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('HEAD', '{{baseUrl}}/Bpmn/example-invoice-c7-review');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
creditor: '',
amount: '',
invoiceCategory: '',
invoiceNumber: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'HEAD',
url: '{{baseUrl}}/Bpmn/example-invoice-c7-review',
headers: {'content-type': 'application/json'},
data: {creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/Bpmn/example-invoice-c7-review';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"creditor":"","amount":"","invoiceCategory":"","invoiceNumber":""}'
};
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 = @{ @"creditor": @"",
@"amount": @"",
@"invoiceCategory": @"",
@"invoiceNumber": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/Bpmn/example-invoice-c7-review"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"HEAD"];
[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}}/Bpmn/example-invoice-c7-review" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}" in
Client.call ~headers ~body `HEAD uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/Bpmn/example-invoice-c7-review",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "HEAD",
CURLOPT_POSTFIELDS => json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => ''
]),
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('HEAD', '{{baseUrl}}/Bpmn/example-invoice-c7-review', [
'body' => '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/Bpmn/example-invoice-c7-review');
$request->setMethod(HTTP_METH_HEAD);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => ''
]));
$request->setRequestUrl('{{baseUrl}}/Bpmn/example-invoice-c7-review');
$request->setRequestMethod('HEAD');
$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}}/Bpmn/example-invoice-c7-review' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/Bpmn/example-invoice-c7-review' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("HEAD", "/baseUrl/Bpmn/example-invoice-c7-review", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/Bpmn/example-invoice-c7-review"
payload = {
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
headers = {"content-type": "application/json"}
response = requests.head(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/Bpmn/example-invoice-c7-review"
payload <- "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}"
encode <- "json"
response <- VERB("HEAD", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/Bpmn/example-invoice-c7-review")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Head.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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.head('/baseUrl/Bpmn/example-invoice-c7-review') do |req|
req.body = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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}}/Bpmn/example-invoice-c7-review";
let payload = json!({
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
});
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("HEAD").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request HEAD \
--url {{baseUrl}}/Bpmn/example-invoice-c7-review \
--header 'content-type: application/json' \
--data '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}'
echo '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}' | \
http HEAD {{baseUrl}}/Bpmn/example-invoice-c7-review \
content-type:application/json
wget --quiet \
--method HEAD \
--header 'content-type: application/json' \
--body-data '{\n "creditor": "",\n "amount": "",\n "invoiceCategory": "",\n "invoiceNumber": ""\n}' \
--output-document \
- {{baseUrl}}/Bpmn/example-invoice-c7-review
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/Bpmn/example-invoice-c7-review")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "HEAD"
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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"clarified": true
}
HEAD
UserTask- AssignReviewerUT
{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT
BODY json
{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "HEAD");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT");
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 \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/head "{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT" {:content-type :json
:form-params {:creditor ""
:amount ""
:invoiceCategory ""
:invoiceNumber ""}})
require "http/client"
url = "{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}"
response = HTTP::Client.head url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Head,
RequestUri = new Uri("{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT"),
Content = new StringContent("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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}}/UserTask/example-invoice-c7-review/AssignReviewerUT");
var request = new RestRequest("", Method.Head);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT"
payload := strings.NewReader("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
req, _ := http.NewRequest("HEAD", 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))
}
HEAD /baseUrl/UserTask/example-invoice-c7-review/AssignReviewerUT HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 84
{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("HEAD", "{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT")
.setHeader("content-type", "application/json")
.setBody("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT"))
.header("content-type", "application/json")
.method("HEAD", HttpRequest.BodyPublishers.ofString("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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 \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT")
.head()
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.head("{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT")
.header("content-type", "application/json")
.body("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
.asString();
const data = JSON.stringify({
creditor: '',
amount: '',
invoiceCategory: '',
invoiceNumber: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('HEAD', '{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT',
headers: {'content-type': 'application/json'},
data: {creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"creditor":"","amount":"","invoiceCategory":"","invoiceNumber":""}'
};
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}}/UserTask/example-invoice-c7-review/AssignReviewerUT',
method: 'HEAD',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "creditor": "",\n "amount": "",\n "invoiceCategory": "",\n "invoiceNumber": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT")
.head()
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'HEAD',
hostname: 'example.com',
port: null,
path: '/baseUrl/UserTask/example-invoice-c7-review/AssignReviewerUT',
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({creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''}));
req.end();
const request = require('request');
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT',
headers: {'content-type': 'application/json'},
body: {creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('HEAD', '{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
creditor: '',
amount: '',
invoiceCategory: '',
invoiceNumber: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT',
headers: {'content-type': 'application/json'},
data: {creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"creditor":"","amount":"","invoiceCategory":"","invoiceNumber":""}'
};
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 = @{ @"creditor": @"",
@"amount": @"",
@"invoiceCategory": @"",
@"invoiceNumber": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"HEAD"];
[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}}/UserTask/example-invoice-c7-review/AssignReviewerUT" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}" in
Client.call ~headers ~body `HEAD uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "HEAD",
CURLOPT_POSTFIELDS => json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => ''
]),
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('HEAD', '{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT', [
'body' => '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT');
$request->setMethod(HTTP_METH_HEAD);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => ''
]));
$request->setRequestUrl('{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT');
$request->setRequestMethod('HEAD');
$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}}/UserTask/example-invoice-c7-review/AssignReviewerUT' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("HEAD", "/baseUrl/UserTask/example-invoice-c7-review/AssignReviewerUT", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT"
payload = {
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
headers = {"content-type": "application/json"}
response = requests.head(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT"
payload <- "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}"
encode <- "json"
response <- VERB("HEAD", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Head.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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.head('/baseUrl/UserTask/example-invoice-c7-review/AssignReviewerUT') do |req|
req.body = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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}}/UserTask/example-invoice-c7-review/AssignReviewerUT";
let payload = json!({
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
});
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("HEAD").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request HEAD \
--url {{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT \
--header 'content-type: application/json' \
--data '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}'
echo '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}' | \
http HEAD {{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT \
content-type:application/json
wget --quiet \
--method HEAD \
--header 'content-type: application/json' \
--body-data '{\n "creditor": "",\n "amount": "",\n "invoiceCategory": "",\n "invoiceNumber": ""\n}' \
--output-document \
- {{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/UserTask/example-invoice-c7-review/AssignReviewerUT")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "HEAD"
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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"reviewer": "John"
}
HEAD
UserTask- ReviewInvoiceUT
{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT
BODY json
{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "HEAD");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT");
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 \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/head "{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT" {:content-type :json
:form-params {:creditor ""
:amount ""
:invoiceCategory ""
:invoiceNumber ""}})
require "http/client"
url = "{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}"
response = HTTP::Client.head url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Head,
RequestUri = new Uri("{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT"),
Content = new StringContent("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT");
var request = new RestRequest("", Method.Head);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT"
payload := strings.NewReader("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
req, _ := http.NewRequest("HEAD", 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))
}
HEAD /baseUrl/UserTask/example-invoice-c7-review/ReviewInvoiceUT HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 84
{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("HEAD", "{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT")
.setHeader("content-type", "application/json")
.setBody("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT"))
.header("content-type", "application/json")
.method("HEAD", HttpRequest.BodyPublishers.ofString("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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 \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT")
.head()
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.head("{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT")
.header("content-type", "application/json")
.body("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
.asString();
const data = JSON.stringify({
creditor: '',
amount: '',
invoiceCategory: '',
invoiceNumber: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('HEAD', '{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT',
headers: {'content-type': 'application/json'},
data: {creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"creditor":"","amount":"","invoiceCategory":"","invoiceNumber":""}'
};
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}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT',
method: 'HEAD',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "creditor": "",\n "amount": "",\n "invoiceCategory": "",\n "invoiceNumber": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT")
.head()
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'HEAD',
hostname: 'example.com',
port: null,
path: '/baseUrl/UserTask/example-invoice-c7-review/ReviewInvoiceUT',
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({creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''}));
req.end();
const request = require('request');
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT',
headers: {'content-type': 'application/json'},
body: {creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('HEAD', '{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
creditor: '',
amount: '',
invoiceCategory: '',
invoiceNumber: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT',
headers: {'content-type': 'application/json'},
data: {creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"creditor":"","amount":"","invoiceCategory":"","invoiceNumber":""}'
};
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 = @{ @"creditor": @"",
@"amount": @"",
@"invoiceCategory": @"",
@"invoiceNumber": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"HEAD"];
[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}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}" in
Client.call ~headers ~body `HEAD uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "HEAD",
CURLOPT_POSTFIELDS => json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => ''
]),
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('HEAD', '{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT', [
'body' => '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT');
$request->setMethod(HTTP_METH_HEAD);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => ''
]));
$request->setRequestUrl('{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT');
$request->setRequestMethod('HEAD');
$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}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("HEAD", "/baseUrl/UserTask/example-invoice-c7-review/ReviewInvoiceUT", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT"
payload = {
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
headers = {"content-type": "application/json"}
response = requests.head(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT"
payload <- "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}"
encode <- "json"
response <- VERB("HEAD", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Head.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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.head('/baseUrl/UserTask/example-invoice-c7-review/ReviewInvoiceUT') do |req|
req.body = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT";
let payload = json!({
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
});
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("HEAD").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request HEAD \
--url {{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT \
--header 'content-type: application/json' \
--data '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}'
echo '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}' | \
http HEAD {{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT \
content-type:application/json
wget --quiet \
--method HEAD \
--header 'content-type: application/json' \
--body-data '{\n "creditor": "",\n "amount": "",\n "invoiceCategory": "",\n "invoiceNumber": ""\n}' \
--output-document \
- {{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/UserTask/example-invoice-c7-review/ReviewInvoiceUT")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "HEAD"
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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"clarified": true
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"clarified": true
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"clarified": false
}
HEAD
UserTask- ApproveInvoiceUT (HEAD)
{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT
BODY json
{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "HEAD");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT");
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 \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/head "{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT" {:content-type :json
:form-params {:creditor ""
:amount ""
:invoiceCategory ""
:invoiceNumber ""}})
require "http/client"
url = "{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}"
response = HTTP::Client.head url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Head,
RequestUri = new Uri("{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT"),
Content = new StringContent("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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}}/UserTask/UserTasks/ApproveInvoiceUT");
var request = new RestRequest("", Method.Head);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT"
payload := strings.NewReader("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
req, _ := http.NewRequest("HEAD", 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))
}
HEAD /baseUrl/UserTask/UserTasks/ApproveInvoiceUT HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 84
{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("HEAD", "{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT")
.setHeader("content-type", "application/json")
.setBody("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT"))
.header("content-type", "application/json")
.method("HEAD", HttpRequest.BodyPublishers.ofString("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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 \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT")
.head()
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.head("{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT")
.header("content-type", "application/json")
.body("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
.asString();
const data = JSON.stringify({
creditor: '',
amount: '',
invoiceCategory: '',
invoiceNumber: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('HEAD', '{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT',
headers: {'content-type': 'application/json'},
data: {creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"creditor":"","amount":"","invoiceCategory":"","invoiceNumber":""}'
};
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}}/UserTask/UserTasks/ApproveInvoiceUT',
method: 'HEAD',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "creditor": "",\n "amount": "",\n "invoiceCategory": "",\n "invoiceNumber": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT")
.head()
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'HEAD',
hostname: 'example.com',
port: null,
path: '/baseUrl/UserTask/UserTasks/ApproveInvoiceUT',
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({creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''}));
req.end();
const request = require('request');
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT',
headers: {'content-type': 'application/json'},
body: {creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('HEAD', '{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
creditor: '',
amount: '',
invoiceCategory: '',
invoiceNumber: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT',
headers: {'content-type': 'application/json'},
data: {creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"creditor":"","amount":"","invoiceCategory":"","invoiceNumber":""}'
};
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 = @{ @"creditor": @"",
@"amount": @"",
@"invoiceCategory": @"",
@"invoiceNumber": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"HEAD"];
[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}}/UserTask/UserTasks/ApproveInvoiceUT" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}" in
Client.call ~headers ~body `HEAD uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "HEAD",
CURLOPT_POSTFIELDS => json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => ''
]),
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('HEAD', '{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT', [
'body' => '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT');
$request->setMethod(HTTP_METH_HEAD);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => ''
]));
$request->setRequestUrl('{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT');
$request->setRequestMethod('HEAD');
$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}}/UserTask/UserTasks/ApproveInvoiceUT' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("HEAD", "/baseUrl/UserTask/UserTasks/ApproveInvoiceUT", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT"
payload = {
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
headers = {"content-type": "application/json"}
response = requests.head(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT"
payload <- "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}"
encode <- "json"
response <- VERB("HEAD", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Head.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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.head('/baseUrl/UserTask/UserTasks/ApproveInvoiceUT') do |req|
req.body = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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}}/UserTask/UserTasks/ApproveInvoiceUT";
let payload = json!({
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
});
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("HEAD").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request HEAD \
--url {{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT \
--header 'content-type: application/json' \
--data '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}'
echo '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}' | \
http HEAD {{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT \
content-type:application/json
wget --quiet \
--method HEAD \
--header 'content-type: application/json' \
--body-data '{\n "creditor": "",\n "amount": "",\n "invoiceCategory": "",\n "invoiceNumber": ""\n}' \
--output-document \
- {{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/UserTask/UserTasks/ApproveInvoiceUT")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "HEAD"
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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"approved": true
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"approved": true
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"approved": false
}
HEAD
UserTask- AssignReviewerUT (HEAD)
{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT
BODY json
{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "HEAD");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT");
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 \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/head "{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT" {:content-type :json
:form-params {:creditor ""
:amount ""
:invoiceCategory ""
:invoiceNumber ""}})
require "http/client"
url = "{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}"
response = HTTP::Client.head url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Head,
RequestUri = new Uri("{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT"),
Content = new StringContent("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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}}/UserTask/UserTasks/AssignReviewerUT");
var request = new RestRequest("", Method.Head);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT"
payload := strings.NewReader("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
req, _ := http.NewRequest("HEAD", 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))
}
HEAD /baseUrl/UserTask/UserTasks/AssignReviewerUT HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 84
{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("HEAD", "{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT")
.setHeader("content-type", "application/json")
.setBody("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT"))
.header("content-type", "application/json")
.method("HEAD", HttpRequest.BodyPublishers.ofString("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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 \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT")
.head()
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.head("{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT")
.header("content-type", "application/json")
.body("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
.asString();
const data = JSON.stringify({
creditor: '',
amount: '',
invoiceCategory: '',
invoiceNumber: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('HEAD', '{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT',
headers: {'content-type': 'application/json'},
data: {creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"creditor":"","amount":"","invoiceCategory":"","invoiceNumber":""}'
};
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}}/UserTask/UserTasks/AssignReviewerUT',
method: 'HEAD',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "creditor": "",\n "amount": "",\n "invoiceCategory": "",\n "invoiceNumber": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT")
.head()
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'HEAD',
hostname: 'example.com',
port: null,
path: '/baseUrl/UserTask/UserTasks/AssignReviewerUT',
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({creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''}));
req.end();
const request = require('request');
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT',
headers: {'content-type': 'application/json'},
body: {creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('HEAD', '{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
creditor: '',
amount: '',
invoiceCategory: '',
invoiceNumber: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT',
headers: {'content-type': 'application/json'},
data: {creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"creditor":"","amount":"","invoiceCategory":"","invoiceNumber":""}'
};
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 = @{ @"creditor": @"",
@"amount": @"",
@"invoiceCategory": @"",
@"invoiceNumber": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"HEAD"];
[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}}/UserTask/UserTasks/AssignReviewerUT" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}" in
Client.call ~headers ~body `HEAD uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "HEAD",
CURLOPT_POSTFIELDS => json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => ''
]),
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('HEAD', '{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT', [
'body' => '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT');
$request->setMethod(HTTP_METH_HEAD);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => ''
]));
$request->setRequestUrl('{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT');
$request->setRequestMethod('HEAD');
$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}}/UserTask/UserTasks/AssignReviewerUT' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("HEAD", "/baseUrl/UserTask/UserTasks/AssignReviewerUT", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT"
payload = {
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
headers = {"content-type": "application/json"}
response = requests.head(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT"
payload <- "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}"
encode <- "json"
response <- VERB("HEAD", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Head.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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.head('/baseUrl/UserTask/UserTasks/AssignReviewerUT') do |req|
req.body = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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}}/UserTask/UserTasks/AssignReviewerUT";
let payload = json!({
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
});
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("HEAD").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request HEAD \
--url {{baseUrl}}/UserTask/UserTasks/AssignReviewerUT \
--header 'content-type: application/json' \
--data '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}'
echo '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}' | \
http HEAD {{baseUrl}}/UserTask/UserTasks/AssignReviewerUT \
content-type:application/json
wget --quiet \
--method HEAD \
--header 'content-type: application/json' \
--body-data '{\n "creditor": "",\n "amount": "",\n "invoiceCategory": "",\n "invoiceNumber": ""\n}' \
--output-document \
- {{baseUrl}}/UserTask/UserTasks/AssignReviewerUT
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/UserTask/UserTasks/AssignReviewerUT")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "HEAD"
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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"reviewer": "John"
}
HEAD
UserTask- PrepareBankTransferUT (HEAD)
{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT
BODY json
{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "HEAD");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT");
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 \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/head "{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT" {:content-type :json
:form-params {:creditor "Great Pizza for Everyone Inc."
:amount 300
:invoiceCategory "Travel Expenses"
:invoiceNumber "I-12345"}})
require "http/client"
url = "{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\n}"
response = HTTP::Client.head url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Head,
RequestUri = new Uri("{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT"),
Content = new StringContent("{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\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}}/UserTask/UserTasks/PrepareBankTransferUT");
var request = new RestRequest("", Method.Head);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT"
payload := strings.NewReader("{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\n}")
req, _ := http.NewRequest("HEAD", 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))
}
HEAD /baseUrl/UserTask/UserTasks/PrepareBankTransferUT HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 136
{
"creditor": "Great Pizza for Everyone Inc.",
"amount": 300,
"invoiceCategory": "Travel Expenses",
"invoiceNumber": "I-12345"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("HEAD", "{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT")
.setHeader("content-type", "application/json")
.setBody("{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT"))
.header("content-type", "application/json")
.method("HEAD", HttpRequest.BodyPublishers.ofString("{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\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 \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT")
.head()
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.head("{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT")
.header("content-type", "application/json")
.body("{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\n}")
.asString();
const data = JSON.stringify({
creditor: 'Great Pizza for Everyone Inc.',
amount: 300,
invoiceCategory: 'Travel Expenses',
invoiceNumber: 'I-12345'
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('HEAD', '{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT',
headers: {'content-type': 'application/json'},
data: {
creditor: 'Great Pizza for Everyone Inc.',
amount: 300,
invoiceCategory: 'Travel Expenses',
invoiceNumber: 'I-12345'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"creditor":"Great Pizza for Everyone Inc.","amount":300,"invoiceCategory":"Travel Expenses","invoiceNumber":"I-12345"}'
};
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}}/UserTask/UserTasks/PrepareBankTransferUT',
method: 'HEAD',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "creditor": "Great Pizza for Everyone Inc.",\n "amount": 300,\n "invoiceCategory": "Travel Expenses",\n "invoiceNumber": "I-12345"\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT")
.head()
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'HEAD',
hostname: 'example.com',
port: null,
path: '/baseUrl/UserTask/UserTasks/PrepareBankTransferUT',
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({
creditor: 'Great Pizza for Everyone Inc.',
amount: 300,
invoiceCategory: 'Travel Expenses',
invoiceNumber: 'I-12345'
}));
req.end();
const request = require('request');
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT',
headers: {'content-type': 'application/json'},
body: {
creditor: 'Great Pizza for Everyone Inc.',
amount: 300,
invoiceCategory: 'Travel Expenses',
invoiceNumber: 'I-12345'
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('HEAD', '{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
creditor: 'Great Pizza for Everyone Inc.',
amount: 300,
invoiceCategory: 'Travel Expenses',
invoiceNumber: 'I-12345'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT',
headers: {'content-type': 'application/json'},
data: {
creditor: 'Great Pizza for Everyone Inc.',
amount: 300,
invoiceCategory: 'Travel Expenses',
invoiceNumber: 'I-12345'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"creditor":"Great Pizza for Everyone Inc.","amount":300,"invoiceCategory":"Travel Expenses","invoiceNumber":"I-12345"}'
};
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 = @{ @"creditor": @"Great Pizza for Everyone Inc.",
@"amount": @300,
@"invoiceCategory": @"Travel Expenses",
@"invoiceNumber": @"I-12345" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"HEAD"];
[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}}/UserTask/UserTasks/PrepareBankTransferUT" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\n}" in
Client.call ~headers ~body `HEAD uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "HEAD",
CURLOPT_POSTFIELDS => json_encode([
'creditor' => 'Great Pizza for Everyone Inc.',
'amount' => 300,
'invoiceCategory' => 'Travel Expenses',
'invoiceNumber' => 'I-12345'
]),
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('HEAD', '{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT', [
'body' => '{
"creditor": "Great Pizza for Everyone Inc.",
"amount": 300,
"invoiceCategory": "Travel Expenses",
"invoiceNumber": "I-12345"
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT');
$request->setMethod(HTTP_METH_HEAD);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'creditor' => 'Great Pizza for Everyone Inc.',
'amount' => 300,
'invoiceCategory' => 'Travel Expenses',
'invoiceNumber' => 'I-12345'
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'creditor' => 'Great Pizza for Everyone Inc.',
'amount' => 300,
'invoiceCategory' => 'Travel Expenses',
'invoiceNumber' => 'I-12345'
]));
$request->setRequestUrl('{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT');
$request->setRequestMethod('HEAD');
$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}}/UserTask/UserTasks/PrepareBankTransferUT' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"creditor": "Great Pizza for Everyone Inc.",
"amount": 300,
"invoiceCategory": "Travel Expenses",
"invoiceNumber": "I-12345"
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"creditor": "Great Pizza for Everyone Inc.",
"amount": 300,
"invoiceCategory": "Travel Expenses",
"invoiceNumber": "I-12345"
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\n}"
headers = { 'content-type': "application/json" }
conn.request("HEAD", "/baseUrl/UserTask/UserTasks/PrepareBankTransferUT", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT"
payload = {
"creditor": "Great Pizza for Everyone Inc.",
"amount": 300,
"invoiceCategory": "Travel Expenses",
"invoiceNumber": "I-12345"
}
headers = {"content-type": "application/json"}
response = requests.head(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT"
payload <- "{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\n}"
encode <- "json"
response <- VERB("HEAD", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Head.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\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.head('/baseUrl/UserTask/UserTasks/PrepareBankTransferUT') do |req|
req.body = "{\n \"creditor\": \"Great Pizza for Everyone Inc.\",\n \"amount\": 300,\n \"invoiceCategory\": \"Travel Expenses\",\n \"invoiceNumber\": \"I-12345\"\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}}/UserTask/UserTasks/PrepareBankTransferUT";
let payload = json!({
"creditor": "Great Pizza for Everyone Inc.",
"amount": 300,
"invoiceCategory": "Travel Expenses",
"invoiceNumber": "I-12345"
});
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("HEAD").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request HEAD \
--url {{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT \
--header 'content-type: application/json' \
--data '{
"creditor": "Great Pizza for Everyone Inc.",
"amount": 300,
"invoiceCategory": "Travel Expenses",
"invoiceNumber": "I-12345"
}'
echo '{
"creditor": "Great Pizza for Everyone Inc.",
"amount": 300,
"invoiceCategory": "Travel Expenses",
"invoiceNumber": "I-12345"
}' | \
http HEAD {{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT \
content-type:application/json
wget --quiet \
--method HEAD \
--header 'content-type: application/json' \
--body-data '{\n "creditor": "Great Pizza for Everyone Inc.",\n "amount": 300,\n "invoiceCategory": "Travel Expenses",\n "invoiceNumber": "I-12345"\n}' \
--output-document \
- {{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"creditor": "Great Pizza for Everyone Inc.",
"amount": 300,
"invoiceCategory": "Travel Expenses",
"invoiceNumber": "I-12345"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/UserTask/UserTasks/PrepareBankTransferUT")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "HEAD"
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()
HEAD
UserTask- ReviewInvoiceUT (HEAD)
{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT
BODY json
{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "HEAD");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT");
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 \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/head "{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT" {:content-type :json
:form-params {:creditor ""
:amount ""
:invoiceCategory ""
:invoiceNumber ""}})
require "http/client"
url = "{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}"
response = HTTP::Client.head url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Head,
RequestUri = new Uri("{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT"),
Content = new StringContent("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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}}/UserTask/UserTasks/ReviewInvoiceUT");
var request = new RestRequest("", Method.Head);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT"
payload := strings.NewReader("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
req, _ := http.NewRequest("HEAD", 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))
}
HEAD /baseUrl/UserTask/UserTasks/ReviewInvoiceUT HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 84
{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("HEAD", "{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT")
.setHeader("content-type", "application/json")
.setBody("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT"))
.header("content-type", "application/json")
.method("HEAD", HttpRequest.BodyPublishers.ofString("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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 \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT")
.head()
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.head("{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT")
.header("content-type", "application/json")
.body("{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
.asString();
const data = JSON.stringify({
creditor: '',
amount: '',
invoiceCategory: '',
invoiceNumber: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('HEAD', '{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT',
headers: {'content-type': 'application/json'},
data: {creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"creditor":"","amount":"","invoiceCategory":"","invoiceNumber":""}'
};
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}}/UserTask/UserTasks/ReviewInvoiceUT',
method: 'HEAD',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "creditor": "",\n "amount": "",\n "invoiceCategory": "",\n "invoiceNumber": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT")
.head()
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'HEAD',
hostname: 'example.com',
port: null,
path: '/baseUrl/UserTask/UserTasks/ReviewInvoiceUT',
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({creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''}));
req.end();
const request = require('request');
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT',
headers: {'content-type': 'application/json'},
body: {creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('HEAD', '{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
creditor: '',
amount: '',
invoiceCategory: '',
invoiceNumber: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'HEAD',
url: '{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT',
headers: {'content-type': 'application/json'},
data: {creditor: '', amount: '', invoiceCategory: '', invoiceNumber: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"creditor":"","amount":"","invoiceCategory":"","invoiceNumber":""}'
};
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 = @{ @"creditor": @"",
@"amount": @"",
@"invoiceCategory": @"",
@"invoiceNumber": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"HEAD"];
[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}}/UserTask/UserTasks/ReviewInvoiceUT" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}" in
Client.call ~headers ~body `HEAD uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "HEAD",
CURLOPT_POSTFIELDS => json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => ''
]),
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('HEAD', '{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT', [
'body' => '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT');
$request->setMethod(HTTP_METH_HEAD);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'creditor' => '',
'amount' => '',
'invoiceCategory' => '',
'invoiceNumber' => ''
]));
$request->setRequestUrl('{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT');
$request->setRequestMethod('HEAD');
$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}}/UserTask/UserTasks/ReviewInvoiceUT' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("HEAD", "/baseUrl/UserTask/UserTasks/ReviewInvoiceUT", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT"
payload = {
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}
headers = {"content-type": "application/json"}
response = requests.head(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT"
payload <- "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\n}"
encode <- "json"
response <- VERB("HEAD", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Head.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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.head('/baseUrl/UserTask/UserTasks/ReviewInvoiceUT') do |req|
req.body = "{\n \"creditor\": \"\",\n \"amount\": \"\",\n \"invoiceCategory\": \"\",\n \"invoiceNumber\": \"\"\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}}/UserTask/UserTasks/ReviewInvoiceUT";
let payload = json!({
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
});
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("HEAD").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request HEAD \
--url {{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT \
--header 'content-type: application/json' \
--data '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}'
echo '{
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
}' | \
http HEAD {{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT \
content-type:application/json
wget --quiet \
--method HEAD \
--header 'content-type: application/json' \
--body-data '{\n "creditor": "",\n "amount": "",\n "invoiceCategory": "",\n "invoiceNumber": ""\n}' \
--output-document \
- {{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"creditor": "",
"amount": "",
"invoiceCategory": "",
"invoiceNumber": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/UserTask/UserTasks/ReviewInvoiceUT")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "HEAD"
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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"clarified": true
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"clarified": true
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"clarified": false
}
HEAD
Worker- ArchiveInvoiceService
{{baseUrl}}/Worker/Workers/ArchiveInvoiceService
BODY json
{
"shouldFail": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "HEAD");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/Worker/Workers/ArchiveInvoiceService");
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 \"shouldFail\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/head "{{baseUrl}}/Worker/Workers/ArchiveInvoiceService" {:content-type :json
:form-params {:shouldFail false}})
require "http/client"
url = "{{baseUrl}}/Worker/Workers/ArchiveInvoiceService"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"shouldFail\": false\n}"
response = HTTP::Client.head url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Head,
RequestUri = new Uri("{{baseUrl}}/Worker/Workers/ArchiveInvoiceService"),
Content = new StringContent("{\n \"shouldFail\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/Worker/Workers/ArchiveInvoiceService");
var request = new RestRequest("", Method.Head);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"shouldFail\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/Worker/Workers/ArchiveInvoiceService"
payload := strings.NewReader("{\n \"shouldFail\": false\n}")
req, _ := http.NewRequest("HEAD", 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))
}
HEAD /baseUrl/Worker/Workers/ArchiveInvoiceService HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 25
{
"shouldFail": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("HEAD", "{{baseUrl}}/Worker/Workers/ArchiveInvoiceService")
.setHeader("content-type", "application/json")
.setBody("{\n \"shouldFail\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/Worker/Workers/ArchiveInvoiceService"))
.header("content-type", "application/json")
.method("HEAD", HttpRequest.BodyPublishers.ofString("{\n \"shouldFail\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"shouldFail\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/Worker/Workers/ArchiveInvoiceService")
.head()
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.head("{{baseUrl}}/Worker/Workers/ArchiveInvoiceService")
.header("content-type", "application/json")
.body("{\n \"shouldFail\": false\n}")
.asString();
const data = JSON.stringify({
shouldFail: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('HEAD', '{{baseUrl}}/Worker/Workers/ArchiveInvoiceService');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'HEAD',
url: '{{baseUrl}}/Worker/Workers/ArchiveInvoiceService',
headers: {'content-type': 'application/json'},
data: {shouldFail: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/Worker/Workers/ArchiveInvoiceService';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"shouldFail":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/Worker/Workers/ArchiveInvoiceService',
method: 'HEAD',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "shouldFail": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"shouldFail\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/Worker/Workers/ArchiveInvoiceService")
.head()
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'HEAD',
hostname: 'example.com',
port: null,
path: '/baseUrl/Worker/Workers/ArchiveInvoiceService',
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({shouldFail: false}));
req.end();
const request = require('request');
const options = {
method: 'HEAD',
url: '{{baseUrl}}/Worker/Workers/ArchiveInvoiceService',
headers: {'content-type': 'application/json'},
body: {shouldFail: false},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('HEAD', '{{baseUrl}}/Worker/Workers/ArchiveInvoiceService');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
shouldFail: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'HEAD',
url: '{{baseUrl}}/Worker/Workers/ArchiveInvoiceService',
headers: {'content-type': 'application/json'},
data: {shouldFail: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/Worker/Workers/ArchiveInvoiceService';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"shouldFail":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"shouldFail": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/Worker/Workers/ArchiveInvoiceService"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"HEAD"];
[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}}/Worker/Workers/ArchiveInvoiceService" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"shouldFail\": false\n}" in
Client.call ~headers ~body `HEAD uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/Worker/Workers/ArchiveInvoiceService",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "HEAD",
CURLOPT_POSTFIELDS => json_encode([
'shouldFail' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('HEAD', '{{baseUrl}}/Worker/Workers/ArchiveInvoiceService', [
'body' => '{
"shouldFail": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/Worker/Workers/ArchiveInvoiceService');
$request->setMethod(HTTP_METH_HEAD);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'shouldFail' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'shouldFail' => null
]));
$request->setRequestUrl('{{baseUrl}}/Worker/Workers/ArchiveInvoiceService');
$request->setRequestMethod('HEAD');
$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}}/Worker/Workers/ArchiveInvoiceService' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"shouldFail": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/Worker/Workers/ArchiveInvoiceService' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"shouldFail": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"shouldFail\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("HEAD", "/baseUrl/Worker/Workers/ArchiveInvoiceService", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/Worker/Workers/ArchiveInvoiceService"
payload = { "shouldFail": False }
headers = {"content-type": "application/json"}
response = requests.head(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/Worker/Workers/ArchiveInvoiceService"
payload <- "{\n \"shouldFail\": false\n}"
encode <- "json"
response <- VERB("HEAD", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/Worker/Workers/ArchiveInvoiceService")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Head.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"shouldFail\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.head('/baseUrl/Worker/Workers/ArchiveInvoiceService') do |req|
req.body = "{\n \"shouldFail\": false\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/Worker/Workers/ArchiveInvoiceService";
let payload = json!({"shouldFail": false});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("HEAD").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request HEAD \
--url {{baseUrl}}/Worker/Workers/ArchiveInvoiceService \
--header 'content-type: application/json' \
--data '{
"shouldFail": false
}'
echo '{
"shouldFail": false
}' | \
http HEAD {{baseUrl}}/Worker/Workers/ArchiveInvoiceService \
content-type:application/json
wget --quiet \
--method HEAD \
--header 'content-type: application/json' \
--body-data '{\n "shouldFail": false\n}' \
--output-document \
- {{baseUrl}}/Worker/Workers/ArchiveInvoiceService
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["shouldFail": false] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/Worker/Workers/ArchiveInvoiceService")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "HEAD"
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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"archived": true
}
HEAD
Worker- star-wars-api-people-detail
{{baseUrl}}/Worker/Workers/star-wars-api-people-detail
BODY json
{
"id": 0,
"optName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "HEAD");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/Worker/Workers/star-wars-api-people-detail");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"id\": 0,\n \"optName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/head "{{baseUrl}}/Worker/Workers/star-wars-api-people-detail" {:content-type :json
:form-params {:id 0
:optName ""}})
require "http/client"
url = "{{baseUrl}}/Worker/Workers/star-wars-api-people-detail"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"id\": 0,\n \"optName\": \"\"\n}"
response = HTTP::Client.head url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Head,
RequestUri = new Uri("{{baseUrl}}/Worker/Workers/star-wars-api-people-detail"),
Content = new StringContent("{\n \"id\": 0,\n \"optName\": \"\"\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}}/Worker/Workers/star-wars-api-people-detail");
var request = new RestRequest("", Method.Head);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"id\": 0,\n \"optName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/Worker/Workers/star-wars-api-people-detail"
payload := strings.NewReader("{\n \"id\": 0,\n \"optName\": \"\"\n}")
req, _ := http.NewRequest("HEAD", 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))
}
HEAD /baseUrl/Worker/Workers/star-wars-api-people-detail HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 30
{
"id": 0,
"optName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("HEAD", "{{baseUrl}}/Worker/Workers/star-wars-api-people-detail")
.setHeader("content-type", "application/json")
.setBody("{\n \"id\": 0,\n \"optName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/Worker/Workers/star-wars-api-people-detail"))
.header("content-type", "application/json")
.method("HEAD", HttpRequest.BodyPublishers.ofString("{\n \"id\": 0,\n \"optName\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"id\": 0,\n \"optName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/Worker/Workers/star-wars-api-people-detail")
.head()
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.head("{{baseUrl}}/Worker/Workers/star-wars-api-people-detail")
.header("content-type", "application/json")
.body("{\n \"id\": 0,\n \"optName\": \"\"\n}")
.asString();
const data = JSON.stringify({
id: 0,
optName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('HEAD', '{{baseUrl}}/Worker/Workers/star-wars-api-people-detail');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'HEAD',
url: '{{baseUrl}}/Worker/Workers/star-wars-api-people-detail',
headers: {'content-type': 'application/json'},
data: {id: 0, optName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/Worker/Workers/star-wars-api-people-detail';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"id":0,"optName":""}'
};
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}}/Worker/Workers/star-wars-api-people-detail',
method: 'HEAD',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "id": 0,\n "optName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"id\": 0,\n \"optName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/Worker/Workers/star-wars-api-people-detail")
.head()
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'HEAD',
hostname: 'example.com',
port: null,
path: '/baseUrl/Worker/Workers/star-wars-api-people-detail',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({id: 0, optName: ''}));
req.end();
const request = require('request');
const options = {
method: 'HEAD',
url: '{{baseUrl}}/Worker/Workers/star-wars-api-people-detail',
headers: {'content-type': 'application/json'},
body: {id: 0, optName: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('HEAD', '{{baseUrl}}/Worker/Workers/star-wars-api-people-detail');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
id: 0,
optName: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'HEAD',
url: '{{baseUrl}}/Worker/Workers/star-wars-api-people-detail',
headers: {'content-type': 'application/json'},
data: {id: 0, optName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/Worker/Workers/star-wars-api-people-detail';
const options = {
method: 'HEAD',
headers: {'content-type': 'application/json'},
body: '{"id":0,"optName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"id": @0,
@"optName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/Worker/Workers/star-wars-api-people-detail"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"HEAD"];
[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}}/Worker/Workers/star-wars-api-people-detail" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"id\": 0,\n \"optName\": \"\"\n}" in
Client.call ~headers ~body `HEAD uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/Worker/Workers/star-wars-api-people-detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "HEAD",
CURLOPT_POSTFIELDS => json_encode([
'id' => 0,
'optName' => ''
]),
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('HEAD', '{{baseUrl}}/Worker/Workers/star-wars-api-people-detail', [
'body' => '{
"id": 0,
"optName": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/Worker/Workers/star-wars-api-people-detail');
$request->setMethod(HTTP_METH_HEAD);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'id' => 0,
'optName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'id' => 0,
'optName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/Worker/Workers/star-wars-api-people-detail');
$request->setRequestMethod('HEAD');
$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}}/Worker/Workers/star-wars-api-people-detail' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"id": 0,
"optName": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/Worker/Workers/star-wars-api-people-detail' -Method HEAD -Headers $headers -ContentType 'application/json' -Body '{
"id": 0,
"optName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"id\": 0,\n \"optName\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("HEAD", "/baseUrl/Worker/Workers/star-wars-api-people-detail", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/Worker/Workers/star-wars-api-people-detail"
payload = {
"id": 0,
"optName": ""
}
headers = {"content-type": "application/json"}
response = requests.head(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/Worker/Workers/star-wars-api-people-detail"
payload <- "{\n \"id\": 0,\n \"optName\": \"\"\n}"
encode <- "json"
response <- VERB("HEAD", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/Worker/Workers/star-wars-api-people-detail")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Head.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"id\": 0,\n \"optName\": \"\"\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.head('/baseUrl/Worker/Workers/star-wars-api-people-detail') do |req|
req.body = "{\n \"id\": 0,\n \"optName\": \"\"\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}}/Worker/Workers/star-wars-api-people-detail";
let payload = json!({
"id": 0,
"optName": ""
});
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("HEAD").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request HEAD \
--url {{baseUrl}}/Worker/Workers/star-wars-api-people-detail \
--header 'content-type: application/json' \
--data '{
"id": 0,
"optName": ""
}'
echo '{
"id": 0,
"optName": ""
}' | \
http HEAD {{baseUrl}}/Worker/Workers/star-wars-api-people-detail \
content-type:application/json
wget --quiet \
--method HEAD \
--header 'content-type: application/json' \
--body-data '{\n "id": 0,\n "optName": ""\n}' \
--output-document \
- {{baseUrl}}/Worker/Workers/star-wars-api-people-detail
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"id": 0,
"optName": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/Worker/Workers/star-wars-api-people-detail")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "HEAD"
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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"people": {
"name": "Luke Skywalker",
"height": "172",
"mass": "77",
"hair_color": "blond",
"skin_color": "fair",
"eye_color": "blue"
},
"fromHeader": "okidoki",
"processStatus": "succeeded",
"type": "Success"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"people": {
"name": "Luke Skywalker",
"height": "172",
"mass": "77",
"hair_color": "blond",
"skin_color": "fair",
"eye_color": "blue"
},
"fromHeader": "okidoki",
"processStatus": "succeeded",
"type": "Success"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"processStatus": "404",
"type": "Failure"
}