Skip to content

Instantly share code, notes, and snippets.

@andresmafra
Last active May 15, 2022 11:30
Show Gist options
  • Save andresmafra/0c6946fde4797f8364bd180ca9419903 to your computer and use it in GitHub Desktop.
Save andresmafra/0c6946fde4797f8364bd180ca9419903 to your computer and use it in GitHub Desktop.
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.vistoriei.com.br/v1/contract/ID_DA_VISTORIA',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {SEU_TOKEN}'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment