Merge pull request #17526 from mattwire/frontendrequiredpaymentfrequency
[civicrm-core.git] / extern / rest.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
10 */
11
12 require_once '../civicrm.config.php';
13 CRM_Core_Config::singleton();
14
15 if (defined('PANTHEON_ENVIRONMENT')) {
16 ini_set('session.save_handler', 'files');
17 }
18 $rest = new CRM_Utils_REST();
19
20 // Json-appropriate header will be set by CRM_Utils_Rest
21 // But we need to set header here for non-json
22 if (empty($_GET['json'])) {
23 header('Content-Type: text/xml');
24 }
25 echo $rest->bootAndRun();