Was ist der Briefträger-token-header-Attribut im generierten code von Postman?

Ich habe mit Postboten zu erkunden, eine REST-Schnittstelle. Bei der Verwendung von Postman ' s code-Generierung Funktion, unabhängig davon, welche Programmiersprache ich wählen, Briefträger immer noch eine postman-token - Attribut in der Kopfzeile. Warum ist es dort?

Siehe beispielsweise PHP-Curl:

<?php

$curl = curl_init();

curl_setopt_array($curl, array(CURLOPT_URL => "https://myURL.com,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
  "authorization: Basic abcdefghijklmnop",
  "cache-control: no-cache",
  "postman-token: wt53gwg-e9bb-645d-g53d-e42f8765aut0"
  ),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
InformationsquelleAutor d4rty | 2016-04-27
Schreibe einen Kommentar