When attempting to create a flight session via POST in PHP with Skyscanner API, I receive a 405 error without the expected location header, though other headers return correctly.
<?php
require_once 'library/HttpClient.php';
$reqHeaders = [
"API-Host" => "example-flights.com",
"API-Key" => "abc123xyz789",
"Content-Type" => "application/x-www-form-urlencoded"
];
$postParams = [
"departDate" => "2022-06-15",
"travelClass" => "economy",
"kids" => 0,
"infants" => 0,
"nation" => "US",
"money" => "USD",
"lang" => "en-US",
"startCity" => "NYC-sky",
"endCity" => "LAX-sky",
"returnDate" => "2022-06-20",
"adults" => 1
];
$responseData = \HttpClient::sendRequest("https://api.example.com/sessions", "POST", $reqHeaders, $postParams);
print_r($responseData);
?>