Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 300 Rev 348
Line 38... Line 38...
38
	 * @param nomService
38
	 * @param nomService
39
	 * @param arrParametres
39
	 * @param arrParametres
40
	 * @return
40
	 * @return
41
	 */
41
	 */
42
	public static RequestBuilder construireRequete(String nomService, String[] arrParametres)	{
42
	public static RequestBuilder construireRequete(String nomService, String[] arrParametres)	{
-
 
43
		return construireRequete(nomService, arrParametres, "GET");
-
 
44
	}
-
 
45
	
-
 
46
	public static RequestBuilder construireRequete(String nomService, String[] arrParametres, String typeRequete)	{
Line 43... Line 47...
43
		
47
		
44
		HashMap<String, String> hmRestrictions = null;
48
		HashMap<String, String> hmRestrictions = null;
Line 45... Line 49...
45
		return construireRequete(nomService, arrParametres, hmRestrictions);
49
		return construireRequete(nomService, arrParametres, hmRestrictions, typeRequete);
Line 46... Line 50...
46
		
50
		
-
 
51
	}
-
 
52
	
-
 
53
	public static RequestBuilder construireRequete(String nomService, HashMap<String, String> hmRestrictions)	{
Line 47... Line 54...
47
	}
54
		return construireRequete(nomService, hmRestrictions, "GET");
48
	
55
	}
Line 49... Line 56...
49
	public static RequestBuilder construireRequete(String nomService, HashMap<String, String> hmRestrictions)	{
56
		public static RequestBuilder construireRequete(String nomService, HashMap<String, String> hmRestrictions, String typeRequete)	{
Line 50... Line 57...
50
		
57
		
Line 51... Line 58...
51
		String[] arrParametres = null;
58
		String[] arrParametres = null;
Line 52... Line 59...
52
		return construireRequete( nomService, arrParametres, hmRestrictions);
59
		return construireRequete( nomService, arrParametres, hmRestrictions, typeRequete);
Line 86... Line 93...
86
		
93
		
87
		String wholeUrl = baseUrl + nomService + strParametres + restrictions;
94
		String wholeUrl = baseUrl + nomService + strParametres + restrictions;
Line 88... Line 95...
88
		wholeUrl = URL.encode(wholeUrl);
95
		wholeUrl = URL.encode(wholeUrl);
-
 
96
		
-
 
97
		GWT.log("Envoi d'une requête: " + wholeUrl, null);
89
		
98
		RequestBuilder rb;
-
 
99
		if (typeRequete.equals("GET"))	{
-
 
100
			rb = new RequestBuilder(RequestBuilder.GET, wholeUrl);
-
 
101
		} else	{
Line 90... Line 102...
90
		GWT.log("Envoi d'une requête: " + wholeUrl, null);
102
			rb = new RequestBuilder(RequestBuilder.POST, wholeUrl);
91
		RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, wholeUrl);
103
		}
Line 92... Line 104...
92
		
104