Subversion Repositories eFlore/Applications.coel

Rev

Rev 463 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
463 jp_milcent 1
package org.tela_botanica.client.http;
2
 
3
import com.google.gwt.core.client.GWT;
4
import com.google.gwt.http.client.Request;
5
import com.google.gwt.http.client.RequestBuilder;
6
import com.google.gwt.http.client.RequestCallback;
7
import com.google.gwt.http.client.RequestException;
8
 
9
public class JsonRestRequestBuilder extends RequestBuilder {
10
 
11
	public JsonRestRequestBuilder(Method httpMethod, String url) {
12
		super(httpMethod, url);
13
		// TODO Auto-generated constructor stub
14
	}
15
 
16
	public Request envoyerRequete(String donneesRequete, RequestCallback retour) {
17
		Request requeteSortie = null;
18
		try {
19
			requeteSortie = sendRequest(donneesRequete, retour);
20
		} catch (RequestException e) {
21
			GWT.log("Une exception est survenue lors de l'envoie de la requête JRest", e);
22
		}
23
		return requeteSortie;
24
	}
25
 
26
}