get
/v1/csrf
Returns two cookies: XSRF-TOKEN and vertx-web.session. These cookies must be provided to subsequent calls to this API. The value of the XSRF-TOKEN cookie must also be passed as a parameter to subsequent calls.
CLIENT REQUEST
curl -X 'GET'
'http://localhost/v1/csrf'
import http.client
conn = http.client.HTTPConnection("undefinedundefined")
conn.request("GET", "/v1/csrf")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))require 'uri'
require 'net/http'
url = URI("http://undefinedundefined/v1/csrf")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyconst data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "http://undefinedundefined/v1/csrf");
xhr.send(data);HttpResponse<String> response = Unirest.get("http://undefinedundefined/v1/csrf")
.asString();import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "http://undefinedundefined/v1/csrf")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://undefinedundefined/v1/csrf",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "http://undefinedundefined/v1/csrf");
CURLcode ret = curl_easy_perform(hnd);var client = new RestClient("http://undefinedundefined/v1/csrf");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);Responses