1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
<?php
namespace Gedcomx\Extensions\FamilySearch\Rs\Client\Helpers;
use Gedcomx\Extensions\FamilySearch\FamilySearchPlatform;
use GuzzleHttp\Psr7\Request;
/**
* A helper class to set accept and content-type headers for REST API requests.
* Class FamilySearchRequest
*
* @package Gedcomx\Extensions\FamilySearch\Rs\Client\Helpers
*/
class FamilySearchRequest
{
/**
* Applies the FamilySearch specific JSON accept and content-type headers on the specified request.
*
* @return array Accept and Content-Type headers
*/
public static function getMediaTypes()
{
return [
'Accept' => FamilySearchPlatform::JSON_MEDIA_TYPE,
'Content-Type' => FamilySearchPlatform::JSON_MEDIA_TYPE
];
}
}