<?php

	include('inc/pdo.inc.php');

	$info = array();

	switch($_SERVER['REQUEST_METHOD']) {

		case 'GET'	:	// LST
					$info['status']		= 'success';
					$info['message']	= 'GET';
			break;


		case 'POST'	:	// ADD
					$info['status']		= 'success';
					$info['message']	= 'POST';
			break;


		case 'PUT'	:	// UPD
					$info['status']		= 'success';
					$info['message']	= 'PUT';
			break;


		case 'DELETE'	:	// DEL
					$info['message']	= 'DELETE';
			break;


		default		:	// NONE
					$info['status']		= 'error';
					$info['code']		= '405';
					$info['message']	= 'METHOD_NOT_ALLOWED';
					$info['data']		= NULL;
			break;

	}

	header('Content-Type: application/json');
	echo json_encode($info,JSON_PRETTY_PRINT);

?>