Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 1415 Rev 1563
Line 1... Line 1...
1
package org.tela_botanica.client.http;
1
package org.tela_botanica.client.http;
Line 2... Line 2...
2
 
2
 
-
 
3
import org.tela_botanica.client.Mediateur;
Line 3... Line -...
3
import org.tela_botanica.client.Mediateur;
-
 
4
 
4
import org.tela_botanica.client.util.Log;
5
import com.google.gwt.core.client.GWT;
5
 
6
import com.google.gwt.http.client.Request;
6
import com.google.gwt.http.client.Request;
7
import com.google.gwt.http.client.RequestBuilder;
7
import com.google.gwt.http.client.RequestBuilder;
-
 
8
import com.google.gwt.http.client.RequestCallback;
Line 8... Line 9...
8
import com.google.gwt.http.client.RequestCallback;
9
import com.google.gwt.http.client.RequestException;
Line 9... Line 10...
9
import com.google.gwt.http.client.RequestException;
10
import com.google.gwt.http.client.URL;
10
 
11
 
11
public class JsonRestRequestBuilder extends RequestBuilder {
-
 
12
 
12
public class JsonRestRequestBuilder extends RequestBuilder {
Line 13... Line 13...
13
	public JsonRestRequestBuilder(Method httpMethod, String url) {
13
 
14
		super(httpMethod, url);
14
	public JsonRestRequestBuilder(Method httpMethod, String url) {
15
		// TODO Auto-generated constructor stub
15
		super(httpMethod, url);
16
	}
16
	}
-
 
17
	
-
 
18
	public Request envoyerRequete(String donneesRequete, RequestCallback retour) {
-
 
19
		Request requeteSortie = null;
17
	
20
		try {
18
	public Request envoyerRequete(String donneesRequete, RequestCallback retour) {
21
			requeteSortie = sendRequest(donneesRequete, retour);
19
		Request requeteSortie = null;
22
			String m = this.getHTTPMethod()+" : "+this.getUrl();
20
		try {
23
			m += ( donneesRequete != null ? "\n"+URL.decodeQueryString(donneesRequete) : "");
21
			requeteSortie = sendRequest(donneesRequete, retour);
24
			Log.trace(m);
Line 22... Line 25...
22
		} catch (RequestException e) {
25
		} catch (RequestException e) {