Subversion Repositories eFlore/Applications.coel

Rev

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

package org.tela_botanica.client.http;

import org.tela_botanica.client.Mediateur;

import com.google.gwt.core.client.GWT;
import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.RequestCallback;
import com.google.gwt.http.client.RequestException;

public class JsonRestRequestBuilder extends RequestBuilder {

        public JsonRestRequestBuilder(Method httpMethod, String url) {
                super(httpMethod, url);
                // TODO Auto-generated constructor stub
        }
        
        public Request envoyerRequete(String donneesRequete, RequestCallback retour) {
                Request requeteSortie = null;
                try {
                        requeteSortie = sendRequest(donneesRequete, retour);
                } catch (RequestException e) {
                        GWT.log("la" + Mediateur.i18nM.erreurJrest(), e);
                }
                return requeteSortie;
        }
        
        public Request envoyerRequeteSuppression(RequestCallback retour) {
                Request requeteSortie = envoyerRequete("action=DELETE", retour);
                return requeteSortie;
        }

}