Subversion Repositories Applications.framework

Rev

Rev 438 | Rev 494 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 438 Rev 439
Line 7... Line 7...
7
* @package 	Framework
7
* @package 	Framework
8
* @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
8
* @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
9
* @copyright	Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
9
* @copyright	Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
10
* @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
10
* @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
11
* @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
11
* @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
12
* @version		$Id: RestClient.php 438 2013-10-11 15:56:08Z raphael $
12
* @version		$Id: RestClient.php 439 2013-10-14 15:48:41Z raphael $
13
*/
13
*/
14
class RestClient {
14
class RestClient {
15
	const HTTP_URL_REQUETE_SEPARATEUR = '&';
15
	const HTTP_URL_REQUETE_SEPARATEUR = '&';
16
	const HTTP_URL_REQUETE_CLE_VALEUR_SEPARATEUR = '=';
16
	const HTTP_URL_REQUETE_CLE_VALEUR_SEPARATEUR = '=';
17
	private $http_methodes = array('GET', 'POST', 'PUT', 'DELETE', 'HEAD', 'OPTIONS', 'CONNECT', 'TRACE');
17
	private $http_methodes = array('GET', 'POST', 'PUT', 'DELETE', 'HEAD', 'OPTIONS', 'CONNECT', 'TRACE');
Line 124... Line 124...
124
		// error_log("framework/envoyerRequete: $mode $url");
124
		// error_log("framework/envoyerRequete: $mode $url");
Line 125... Line 125...
125
 
125
 
126
		// nous n'activons le wrapper que pour GET pour l'instant
126
		// nous n'activons le wrapper que pour GET pour l'instant
127
		// car l'utilisation de curl pour les autres modes pourrait
127
		// car l'utilisation de curl pour les autres modes pourrait
128
		// vraisemblablement induire des comportements différents. (test-suite needed)
128
		// vraisemblablement induire des comportements différents. (test-suite needed)
129
		if(function_exists('curl_init') && $mode == 'GET') {
129
		if(FALSE && function_exists('curl_init') && $mode == 'GET') {
130
			return $this->envoyerCurlRequete($url, $mode, $donnees);
130
			return $this->envoyerCurlRequete($url, $mode, $donnees);
Line 131... Line 131...
131
		}
131
		}
132
 
132